Update Readme.md
[EroSomnia.git] / Point and Click Game1 / main.cpp
blob2fa62a0a75bf02cfc220664319fc60980b3f3097
1 #include <vector>
2 #include <fstream>
3 #include <random>
4 #include <chrono>
5 #include <Windows.h>
6 #include <atlstr.h>
8 #include <cmath>
10 #include "ScreenIncludes.h"
11 #include "KeyboardMouseIO.h"
12 #include "BGM.h"
15 #include "SaveData.h"
16 #include "OpeningItems.h".
17 #include "MenuGraphics.h"
18 #include "GameGraphics.h"
19 #include "SFXLibrary.h"
20 #include "BGMLibrary.h"
21 #include "AnimationLibrary.h"
23 #include <boost\archive\binary_iarchive.hpp>
24 #include <boost\archive\binary_oarchive.hpp>
26 #undef main
28 #define LCLICK Items::inputs->at(LEFTMOUSECLICKED) && !Items::inputs->at(LEFTMOUSEHELD)
29 #define LHELD Items::inputs->at(LEFTMOUSEHELD)
30 #define RCLICK Items::inputs->at(RIGHTMOUSECLICKED) && !Items::inputs->at(RIGHTMOUSEHELD)
31 #define RHELD Items::inputs->at(RIGHTMOUSEHELD)
33 //#define MAINGAMEOFF
34 //#define DEMO
35 #define BETA
36 #define RELEASE
37 //#define UNLOCK
38 //#define JUMPTEST
39 //#define SERIALIZE
40 #ifdef SERIALIZE
41 #undef JUMPTEST
42 #endif
44 /**NOTES*/
45 //Make Incence effect point gain.
46 //Reverse Incence with CHCL3 for reduce gain and bar decrease
49 #define ENGLISH
50 //#define JAPANESE
51 //#define MULTILANG
53 int ScreenWidth, ScreenHeight;
55 namespace CardTextures {
56 Texture* card0; // used for op
57 Texture* card1; // used for unlock 1
58 Texture* card2;
59 Texture* card3;
60 Texture* card4;
63 namespace Items {
64 std::vector<bool>* inputs;
65 #ifdef ENGLISH
66 bool engFlag = true;
67 #endif // ENGLISH
68 #ifdef SERIALIZE
69 bool serialFlag = true;
70 #endif // SERIALIZE
71 #ifndef SERIALIZE
72 bool serialFlag = false;
73 #endif
75 SaveData userData;
76 OpeningItems openingItems;
77 MenuGraphics menuGraphics;
78 GameGraphics gameGraphics;
79 AnimationLibrary animationLibrary;
80 BGMLibrary bgmLibrary;
81 SFXLibrary sfxLibrary;
83 int screen;
84 int gameState = -1;
86 int gameMode = 0; // 1 is free 2 is reg 3 is timed 4 is hard
88 KeyboardMouseIO* mio;
89 SDL_Renderer* r1;
90 SDL_Window* w1;
92 Texture* blockX;
93 Texture* msgBox;
95 SDL_Rect largeBox;
96 std::vector<Texture*>* textureDelivery;
97 std::vector<std::string>* textDelivery;
98 std::vector<int>* locationsDelivery;
99 std::vector<int>* operationsDelivery;
101 const int min = 0;
102 const int max = 100000;
103 std::default_random_engine generator;
104 std::uniform_int_distribution<int> distribution(min, max);
106 std::default_random_engine generatorBinary;
107 std::uniform_int_distribution<int> distributionBinary(0, 1);
110 namespace Sound {
112 /*SFXLibrary sfxLibrary;*/
114 //menu and ui sfx
116 SFX* StartSFX;
117 SFX* ClickSFX;
118 SFX* SelectionSFX;
119 SFX* SelectionSFX2;
120 SFX* DerobeSFX;
121 SFX* RobeSFX;
122 SFX* NoSFX;
123 SFX* OpenSFX;
125 //game sfx
127 SFX* IntercomSFX;
128 SFX* LightningSFX;
129 SFX* PassingSFX;
130 SFX* StepsSFX;
131 SFX* XingSFX;
133 BGM* Track1;
134 BGM* Track2;
135 BGM* Track3;
136 BGM* Track4;
137 BGM* TrainBG;
140 namespace Text {
141 std::vector<std::string> MenuText;
142 std::vector<std::string> OpeningText;
143 std::vector<std::string> GameText;
144 std::vector<std::string> TipText;
145 std::vector<std::string> PromptText;
146 std::vector<std::string> PlotText;
147 std::vector<std::string> extraText;
148 std::vector<std::string> hardPlotText;
149 std::vector<std::string>timePlotText;
151 std::vector<std::string> badPlotText;
152 std::vector<std::string> regPlotText;
153 std::vector<std::string> goodPlotText;
155 enum NameTitles {
156 Fingers = 0,
157 Hands = 1,
158 Penis = 2,
159 Outer = 3,
160 Inner = 4,
161 Experience = 5,
162 Awareness = 6,
163 CHCl3 = 7,
164 CHCl3Tip = 8,
165 Incence = 9,
166 IncenceTip = 10,
169 enum TipTitles {
170 Mo = 0, Ni = 1, Fi = 2, Ha = 3, Th = 4, Br = 5, Ma = 6, Fe = 7, Xx = 8, Bl = 9, To = 10, Sk = 11, Bra = 12, Pa = 13, Thh = 14,
171 Ch = 15, In = 16, Scroll = 17
174 Words* backWords;
175 bool clickBackWords;
178 namespace Prompts {
180 int x, y;
181 bool promptTab;
182 SDL_Color previousColor;
183 bool runPrompt(std::vector<Words*> word) {
185 SDL_Rect mainBox = { Graphics::prcnt(0.28,'x',Items::w1), Graphics::prcnt(0.3,'y',Items::w1), Graphics::prcnt(0.5,'x',Items::w1), Graphics::prcnt(0.3,'y',Items::w1) };
186 SDL_Rect OKBox = { Graphics::prcnt(0.28,'x',Items::w1), Graphics::prcnt(0.50,'y',Items::w1), Graphics::prcnt(0.25,'x',Items::w1), Graphics::prcnt(0.10,'y',Items::w1) };
187 SDL_Rect NoBox = { Graphics::prcnt(0.53,'x',Items::w1), Graphics::prcnt(0.50,'y',Items::w1), Graphics::prcnt(0.25,'x',Items::w1), Graphics::prcnt(0.10,'y',Items::w1) };
189 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
190 int oldElapsed = 0;
191 int startTime = SDL_GetTicks();
192 Uint8 r = 0, g = 0, b = 0, a = 0;
193 SDL_GetRenderDrawColor(Items::r1, &r, &g, &b, &a);
194 previousColor = { r,g,b,a };
195 bool promptRunning = true;
196 int wordSize = word.size();
197 while (promptRunning) {
198 int elapsed = SDL_GetTicks() - startTime;
199 if (elapsed - oldElapsed > 16) {
200 Items::inputs = Items::mio->processKBMInput(&x, &y);
201 if (Items::inputs->at(QUIT)) return false;
202 if (Items::inputs->at(RIGHTMOUSECLICKED) && !Items::inputs->at(RIGHTMOUSEHELD)) {
203 promptTab = false;
204 promptRunning = false;
207 oldElapsed = elapsed;
209 Items::msgBox->renderTexture(mainBox);
211 SDL_SetRenderDrawColor(Items::r1, 100, 100, 100, 255);
212 SDL_RenderDrawRect(Items::r1, &mainBox);
213 SDL_RenderDrawRect(Items::r1, &OKBox);
214 SDL_RenderDrawRect(Items::r1, &NoBox);
215 #define MSG 0
216 #define YES 1
217 #define NO 2
218 #define SUB 3
219 if (wordSize > SUB) {
220 word.at(MSG)->renderTexture(0.30, 0.34);
221 word.at(SUB)->renderTexture(0.30, 0.42);
223 else word.at(MSG)->renderTexture(0.30, 0.37);
225 word.at(YES)->renderTexture(0.33, 0.52);
226 word.at(NO)->renderTexture(0.55, 0.52);
228 SDL_SetRenderDrawColor(Items::r1, 0, 100, 0, 125);
229 if (GenericGameTools::checkRectHitBox(OKBox, x, y)) {
230 if (LCLICK) {
231 promptTab = true;
232 promptRunning = false;
234 else {
235 SDL_RenderFillRect(Items::r1, &OKBox);
238 else if (GenericGameTools::checkRectHitBox(NoBox, x, y)) {
239 if (LCLICK) {
240 promptTab = false;
241 promptRunning = false;
243 else {
244 SDL_RenderFillRect(Items::r1, &NoBox);
247 SDL_SetRenderDrawColor(Items::r1, previousColor.r, previousColor.g, previousColor.b, previousColor.a);
248 SDL_RenderPresent(Items::r1);
252 for each(Words* line in word) {
253 line->clearWords();
255 return promptTab;
259 namespace Plot {
261 std::vector<Texture*> opTextureSet;
262 std::vector<int> opLocations;
263 std::vector<int> opOperations;
265 std::vector<Texture*>hardTextureSet;
266 std::vector<int>hardLocations;
267 std::vector<int>hardOperations;
269 std::vector<Texture*>timeTextureSet;
270 std::vector<int>timeLocations;
271 std::vector<int>timeOperations;
273 std::vector<Texture*> badTextureSet;
274 std::vector<int> badLocations;
275 std::vector<int> badOperations;
277 std::vector<Texture*> regularTextureSet;
278 std::vector<int> regularLocations;
279 std::vector<int> regularOperations;
281 std::vector<Texture*> goodTextureSet;
282 std::vector<int> goodLocations;
283 std::vector<int> goodOperations;
285 std::vector<Texture*>* textureDelivery;
286 std::vector<std::string>* textDelivery;
287 std::vector<int>* switchLocationDelivery;
288 std::vector<int>* switchOperationDelivery;
290 SDL_Rect textBoxText;
292 TextBox* textBoxWords;
293 KeyboardMouseIO* kbm;
295 int clickCounter = 0;
296 int currentLocation = 0;
298 bool screenRunning = true;
300 const int FPS = 30;
301 DATATYPE_MILLISECONDS systemTime;
303 int alpha;
304 int x;
305 int y;
306 int* screen;
307 int elapsed = -1;
308 int startTime = -1;
309 int tab = 1;
310 int yClip = 0;
312 long long initial = 0;
313 long long expired = 0;
315 void gameLoop();
317 void processInput();
318 void update();
319 void play();
320 void render();
321 void close();
323 void decideAction(int loc) {
326 void decideSwitch(int loc) {
329 int oldElapsed;
330 void runGame(std::vector<Texture*>* td, std::vector<std::string>* text, std::vector<int>* sw, std::vector<int>* so) {
331 textureDelivery = td;
332 textDelivery = text;
333 switchLocationDelivery = sw;
334 switchOperationDelivery = so;
336 clickCounter = 0;
337 currentLocation = 0;
338 decideAction(switchLocationDelivery->at(currentLocation));
339 decideSwitch(switchLocationDelivery->at(currentLocation));
341 textBoxText = //{ Graphics::prcnt(-0.01, 'x', Items::w1), Graphics::prcnt(0.73, 'y', Items::w1), Graphics::prcnt(1.01, 'x', Items::w1), Graphics::prcnt(0.28, 'y', Items::w1) };
342 { Graphics::prcnt(0.06, 'x', Items::w1), Graphics::prcnt(0.71, 'y', Items::w1), Graphics::prcnt(0.90, 'x', Items::w1), Graphics::prcnt(0.247, 'y', Items::w1) };
343 SDL_Rect marginBoxText = { Graphics::prcnt(0.12, 'x', Items::w1), Graphics::prcnt(0.74, 'y', Items::w1), Graphics::prcnt(0.84, 'x', Items::w1), Graphics::prcnt(0.243, 'y', Items::w1) };
344 textBoxWords = new TextBox( 48, 0, textDelivery->at(clickCounter), SDL_Color{ 245,245,220,255 }, textBoxText, marginBoxText, Items::r1, Items::w1);
346 startTime = SDL_GetTicks();
347 oldElapsed = 0;
348 gameLoop();
351 void gameLoop() {
353 screenRunning = true;
354 initial = 0;
355 expired = 0;
357 if (switchOperationDelivery->at(0) == 0) {
358 Mix_VolumeMusic(MIX_MAX_VOLUME / 4);
359 Items::bgmLibrary.Track2->playFadeIn(-1, 500);
361 else if (switchOperationDelivery->at(0) == -1) {
362 Mix_VolumeMusic(MIX_MAX_VOLUME / 8);
363 Items::bgmLibrary.Track3->playFadeIn(-1, 1000);
365 else if (switchOperationDelivery->at(0) == 1)
366 Items::bgmLibrary.Track4->playFadeIn(-1, 500);
367 else {}
369 while (screenRunning) {
370 systemTime = SYSTEM_MILLISECONDS;
371 initial = systemTime.count();
373 processInput();
374 update();
375 play();
376 if (screenRunning)
377 render();
378 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
381 close();
384 void processInput() {
385 Items::inputs = Items::mio->processKBMInput(&x, &y);
386 if (Items::inputs->at(QUIT)) {
387 screenRunning = false;
388 Items::screen = -1;
391 void update() {
392 elapsed = SDL_GetTicks() - startTime;
393 int delta = elapsed - oldElapsed;
394 //std::cout << elapsed << " - " << oldElapsed << " = " << delta << "\n";
395 if (delta > 10000 || (LCLICK && delta > 60) || Items::inputs->at(CTRL) || Items::inputs->at(RIGHTMOUSEHELD)) {
396 oldElapsed = elapsed;
397 clickCounter++;
398 textDelivery;
399 if (switchLocationDelivery->at(currentLocation) == clickCounter) {
400 currentLocation++;
401 if (currentLocation == switchLocationDelivery->size()) { //leave sequence
402 --currentLocation;
403 --clickCounter;
404 screenRunning = false;
405 if (switchOperationDelivery->at(0) == 0) {
406 if (Prompts::runPrompt({
407 new Words(60 ,0,Text::PromptText.at(5), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
408 new Words(60,0,Text::PromptText.at(0),SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
409 new Words(60 ,0,Text::PromptText.at(1), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) })) {
410 Items::screen = 11;
411 Items::gameState = switchOperationDelivery->at(0);
412 Items::sfxLibrary.startSFX->playSFX();
414 else {
415 int retOp = switchOperationDelivery->at(0);
416 if (retOp == 0) {
417 Items::screen = 01;
418 Plot::runGame(&regularTextureSet, &Text::regPlotText, &regularLocations, &regularOperations);
419 screenRunning = false;
421 else {
422 std::cout << "err\n";
426 else {
427 Items::gameState = switchOperationDelivery->at(0);
428 Items::screen = 01;
429 Items::bgmLibrary.Track1->play();
431 Prompts::promptTab = false;
432 return;
436 textBoxWords->changeBoxWords(textDelivery->at(clickCounter));
439 void play() {
440 if (screenRunning == false) {
443 SDL_Color blueBase = { 39, 74, 183, 199 };
444 SDL_Color PurpleTransition = { 100, 84, 190, 255 };
445 SDL_Color blueBorder = { 125, 125, 255, 255 };
446 void render() {
447 SDL_RenderClear(Items::r1);
449 textureDelivery->at(currentLocation)->renderTexture();
451 textBoxWords->renderBoxWords(blueBase, PurpleTransition, 1.0, 45, 1.0, 0.3, blueBorder);
452 //textBoxWords->renderBoxWords(blueBase, blueBorder);
453 SDL_SetRenderDrawColor(Items::r1, 255, 255, 255, 255);
454 SDL_RenderPresent(Items::r1);
457 void close() {
458 if(Items::gameState != -1 && Items::gameState != 9)
459 Mix_FadeOutMusic(200);
460 delete kbm;
461 oldElapsed = 0;
463 opTextureSet.clear();
464 opLocations.clear();
465 opOperations.clear();
467 hardTextureSet.clear();
468 hardLocations.clear();
469 hardOperations.clear();
471 timeTextureSet.clear();
472 timeLocations.clear();
473 timeOperations.clear();
475 badTextureSet.clear();
476 badLocations.clear();
477 badOperations.clear();
479 regularTextureSet.clear();
480 regularLocations.clear();
481 regularOperations.clear();
483 goodTextureSet.clear();
484 goodLocations.clear();
485 goodOperations.clear();
487 while (Mix_FadingMusic() == MIX_FADING_OUT) {
488 Items::inputs = Items::mio->processKBMInput(&x, &y);
489 if (LCLICK)
490 Mix_HaltMusic();
496 namespace SubMenu {
498 void setPlotElements() {
499 Plot::opTextureSet.push_back(Items::menuGraphics.bg1);
500 Plot::opTextureSet.push_back(Items::menuGraphics.bg2);
501 Plot::opTextureSet.push_back(Items::menuGraphics.card0);
502 Plot::opOperations.push_back(0);
503 Plot::opLocations.push_back(7);
504 Plot::opLocations.push_back(17);
505 Plot::opLocations.push_back(Text::PlotText.size());
507 Plot::hardTextureSet.push_back(Items::menuGraphics.card0);
508 Plot::hardOperations = { 0 };
509 Plot::hardLocations.push_back(Text::hardPlotText.size());
511 Plot::timeTextureSet.push_back(Items::menuGraphics.card0);
512 Plot::timeOperations = { 0 };
513 Plot::timeLocations.push_back(Text::timePlotText.size());
515 Plot::badTextureSet.push_back(Items::menuGraphics.bg3);
516 Plot::badTextureSet.push_back(Items::menuGraphics.bg4);
517 Plot::badLocations.push_back(3);
518 Plot::badLocations.push_back(Text::badPlotText.size());
519 Plot::badOperations.push_back(-1);
521 Plot::regularTextureSet.push_back(Items::menuGraphics.bg3);
522 Plot::regularTextureSet.push_back(Items::menuGraphics.bg5);
523 Plot::regularLocations.push_back(3);
524 Plot::regularLocations.push_back(Text::regPlotText.size());
525 Plot::regularOperations.push_back(9);
527 #ifdef BETA
528 Plot::goodTextureSet.push_back(Items::menuGraphics.bg3);
529 Plot::goodOperations = { -1 };
530 Plot::goodLocations = { (int)Text::goodPlotText.size() };
531 #endif
532 #ifndef BETA
533 Plot::goodTextureSet.push_back(Items::menuGraphics.bg3);
534 Plot::goodTextureSet.push_back(Items::menuGraphics.bg6);
535 Plot::goodOperations = { -1 };
536 Plot::goodLocations = { 3, (int)Text::goodPlotText.size() };
537 #endif
541 SDL_Rect tipBoxO;
542 SDL_Rect tipBoxI;
544 Texture* subBG;
545 Texture* subMenuIconR;
546 Texture* subMenuIconL;
548 Words *freeWords, *regularWords, *timeWords, *hardWords,
549 *freeTip, *regularTip, *timeTip, *hardTip;
550 Words** currentWords;
551 bool hover;
553 bool clickReg, clickTime, clickHard, clickFree,
554 hoverReg, hoverTime, hoverHard, hoverFree;
555 bool click;
557 bool screenRunning = true;
559 const int FPS = 30;
560 DATATYPE_MILLISECONDS systemTime;
562 int alpha;
563 int x;
564 int y;
565 int* screen;
566 int elapsed = -1;
567 int tab = 1;
568 int yClip = 0;
570 long long initial = 0;
571 long long expired = 0;
573 void runGame();
574 void gameLoop();
576 void processInput();
577 void update();
578 void play();
579 void render();
580 void close();
582 void runGame() {
583 Text::backWords->changeTextFont(72, 0);
584 tipBoxO = {
585 Graphics::prcnt(0.5, 'x', Items::w1), 0,
586 Graphics::prcnt(0.5, 'x', Items::w1), Graphics::prcnt(0.5, 'y', Items::w1)
588 tipBoxI = {
589 Graphics::prcnt(0.51, 'x', Items::w1), Graphics::prcnt(0.01, 'y', Items::w1),
590 Graphics::prcnt(0.5, 'x', Items::w1), Graphics::prcnt(0.48, 'y', Items::w1)
592 Text::backWords->setLocation(0.05, 0.45);
593 GenericGameTools::reset();
596 if (Items::userData.gate2 == 1095651 && Items::userData.gate1 == 95631 && Items::userData.gate0 == -9384) {
597 freeWords->changeTextColor(SDL_Color{ 0,0,0,255 });
598 regularWords->changeTextColor(SDL_Color{ 0,0,0,255 });
599 timeWords->changeTextColor(SDL_Color{ 0,0,0,255 });
600 hardWords->changeTextColor(SDL_Color{ 0,0,0,255 });
602 else if (Items::userData.gate2 == 1095651 && Items::userData.gate1 == 95631) {
603 freeWords->changeTextColor(SDL_Color{ 0,0,0,255 });
604 regularWords->changeTextColor(SDL_Color{ 0,0,0,255 });
605 timeWords->changeTextColor(SDL_Color{ 0,0,0,255 });
606 hardWords->changeTextColor(SDL_Color{ 125,125,125,255 });
609 else if (Items::userData.gate0 == -9384) {
610 freeWords->changeTextColor(SDL_Color{ 125,125,125,255 });
611 regularWords->changeTextColor(SDL_Color{ 0,0,0,255 });
612 timeWords->changeTextColor(SDL_Color{ 125,125,125,255 });
613 hardWords->changeTextColor(SDL_Color{ 125,125,125,255 });
616 gameLoop();
619 void gameLoop() {
621 screenRunning = true;
622 initial = 0;
623 expired = 0;
625 while (screenRunning) {
626 systemTime = SYSTEM_MILLISECONDS;
627 initial = systemTime.count();
629 processInput();
630 update();
631 play();
632 render();
633 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
636 close();
639 void processInput() {
640 Items::inputs = Items::mio->processKBMInput(&x, &y);
641 if (Items::inputs->at(QUIT)) {
642 screenRunning = false;
643 Items::screen = -1;
646 void update() {
647 hover = hoverReg = hoverTime = hoverHard = hoverFree = false;
648 #ifndef DEMO
649 //-9384
650 //20276
651 //1095651
652 //095631
653 if (GenericGameTools::checkRectHitBox(hardWords->box, x, y) && Items::userData.gate2 == 1095651) {
654 currentWords = &hardWords;
655 hover = hoverHard = true;
656 if (LCLICK) {
657 setPlotElements();
658 Items::textureDelivery = &Plot::hardTextureSet;
659 Items::textDelivery = &Text::hardPlotText;
660 Items::locationsDelivery = &Plot::hardLocations;
661 Items::operationsDelivery = &Plot::hardOperations;
662 clickHard = true;
663 click = true;
666 else if (GenericGameTools::checkRectHitBox(freeWords->box, x, y) && Items::userData.gate1 == 95631) {
667 currentWords = &freeWords;
668 hover = hoverFree = true;
669 if (LCLICK) {
670 clickFree = true;
671 click = true;
674 else if (GenericGameTools::checkRectHitBox(timeWords->box, x, y) && Items::userData.gate1 == 95631) {
675 currentWords = &timeWords;
676 hover = hoverTime = true;
677 if (LCLICK) {
678 setPlotElements();
679 Items::textureDelivery = &Plot::timeTextureSet;
680 Items::textDelivery = &Text::timePlotText;
681 Items::locationsDelivery = &Plot::timeLocations;
682 Items::operationsDelivery = &Plot::timeOperations;
683 clickTime = true;
684 click = true;
687 #endif
688 /////////////////////////////////////////////////////////////////
689 if (GenericGameTools::checkRectHitBox(regularWords->box, x, y) && Items::userData.gate0 == -9384) {
690 currentWords = &regularWords;
691 hover = hoverReg = true;
692 if (LCLICK) {
693 setPlotElements();
694 Items::textureDelivery = &Plot::opTextureSet;
695 Items::textDelivery = &Text::PlotText;
696 Items::locationsDelivery = &Plot::opLocations;
697 Items::operationsDelivery = &Plot::opOperations;
698 clickReg = true;
699 click = true;
702 else if (GenericGameTools::checkRectHitBox(Text::backWords->box, x, y)) {
703 currentWords = &Text::backWords;
704 hover = true;
705 if (LCLICK) {
706 Text::clickBackWords = true;
707 click = true;
711 void play() {
712 if (click) {
713 Items::sfxLibrary.ClickSFX->playSFX();
714 click = false;
715 if (clickReg) {
716 Mix_FadeOutMusic(500);
718 else if (clickFree || clickHard || clickTime) {
719 Mix_FadeOutMusic(400);
725 void render() {
726 SDL_RenderClear(Items::r1);
728 Items::menuGraphics.subBG->renderTexture();
731 Items::menuGraphics.subMenuIconR->renderTexture();
732 //subMenuIconL->renderTexture();
733 if (hover) {
734 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
735 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
736 SDL_Rect smallBox = SDL_Rect{
737 (**currentWords).box.x - Graphics::prcnt(0.025, 'x', Items::w1),
738 (**currentWords).box.y - Graphics::prcnt(0.025, 'y', Items::w1),
739 (**currentWords).box.w + Graphics::prcnt(0.05, 'x', Items::w1),
740 (**currentWords).box.h + Graphics::prcnt(0.05, 'y', Items::w1)
742 SDL_RenderFillRect(Items::r1, &smallBox);
743 if (hoverFree) {
744 freeTip->renderTexture();
746 else if (hoverReg) {
747 regularTip->renderTexture();
749 else if (hoverTime) {
750 timeTip->renderTexture();
752 else if (hoverHard) {
753 hardTip->renderTexture();
758 freeWords->renderTexture();
759 regularWords->renderTexture();
760 timeWords->renderTexture();
761 hardWords->renderTexture();
762 Text::backWords->renderTexture();
763 #ifdef DEMO
764 Items::blockX->renderTexture(freeWords->box);
765 Items::blockX->renderTexture(timeWords->box);
766 Items::blockX->renderTexture(hardWords->box);
767 #endif // DEMO
769 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 255);
770 //SDL_RenderFillRect(Items::r1, &tipBoxO);
771 //SDL_SetRenderDrawColor(Items::r1, 255, 255, 255, 255);
772 //SDL_RenderFillRect(Items::r1, &tipBoxI);
774 if (clickFree) {
775 alpha = GenericGameTools::incrementAtRate(0, 255, 500);
776 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
777 SDL_RenderFillRect(Items::r1, &Items::largeBox);
778 if (alpha >= 255) {
779 screenRunning = false;
780 Items::screen = 11;
781 Items::gameMode = 1;
784 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
785 else if (clickReg) {
786 alpha = GenericGameTools::incrementAtRate(0, 255, 500);
787 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
788 SDL_RenderFillRect(Items::r1, &Items::largeBox);
789 if (alpha >= 255) {
790 screenRunning = false;
791 Items::screen = 10;
792 Items::gameMode = 2;
795 else if (clickTime) {
796 alpha = GenericGameTools::incrementAtRate(0, 255, 500);
797 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
798 SDL_RenderFillRect(Items::r1, &Items::largeBox);
799 if (alpha >= 255) {
800 screenRunning = false;
801 Items::screen = 10;
802 Items::gameMode = 3;
805 else if (clickHard) {
806 alpha = GenericGameTools::incrementAtRate(0, 255, 500);
807 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
808 SDL_RenderFillRect(Items::r1, &Items::largeBox);
809 if (alpha >= 255) {
810 screenRunning = false;
811 Items::screen = 10;
812 Items::gameMode = 4;
815 else if (Text::clickBackWords) {
816 alpha = GenericGameTools::incrementAtRate(0, 255, 500);
817 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
818 SDL_RenderFillRect(Items::r1, &Items::largeBox);
819 if (alpha >= 255) {
820 screenRunning = false;
821 Items::screen = 01;
825 SDL_SetRenderDrawColor(Items::r1, 255, 255, 255, 225);
826 SDL_RenderPresent(Items::r1);
829 void close() {
830 clickFree = false;
831 clickHard = false;
832 clickReg = false;
833 clickTime = false;
834 Text::clickBackWords = false;
835 alpha = 0;
839 namespace ImageView {
841 Words** backWords;
843 bool screenRunning = true, hover;
845 const int FPS = 30;
846 DATATYPE_MILLISECONDS systemTime;
848 int alpha;
849 int x;
850 int y;
851 int* screen;
852 int elapsed = -1;
853 int tab = 1;
854 int yClip = 0;
856 long long initial = 0;
857 long long expired = 0;
859 void runView(Texture** img) {
860 screenRunning = true;
861 initial = 0;
862 expired = 0;
864 SDL_Rect backBox = { Graphics::prcnt(0.825, 'x', Items::w1), Graphics::prcnt(0.85, 'y', Items::w1)
865 , Graphics::prcnt(0.2, 'x', Items::w1) , Graphics::prcnt(0.2, 'y', Items::w1) };
867 while (screenRunning) {
868 systemTime = SYSTEM_MILLISECONDS;
869 initial = systemTime.count();
871 Items::inputs = Items::mio->processKBMInput(&x, &y);
872 if (Items::inputs->at(QUIT)) {
873 screenRunning = false;
874 Items::screen = -1;
876 SDL_RenderClear(Items::r1);
878 (**img).renderTexture();
879 (**backWords).renderTexture(0.85, 0.9);
881 if (GenericGameTools::checkRectHitBox(backBox, x, y)) {
882 if (LCLICK) {
883 screenRunning = false;
885 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
886 SDL_Rect box = {
887 (backBox).x - Graphics::prcnt(0.005, 'x', Items::w1),
888 (backBox).y - Graphics::prcnt(0.005, 'y', Items::w1),
889 (backBox).w + Graphics::prcnt(0.01, 'x', Items::w1),
890 (backBox).h + Graphics::prcnt(0.01, 'y', Items::w1)
892 SDL_RenderFillRect(Items::r1, &box);
893 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 225);
896 SDL_RenderPresent(Items::r1);
898 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
903 namespace ExtraMenu {
905 Texture* ExtraBG, *ExtraBGHolder;
906 Texture* containerTextureEC;
907 Texture* containerTextureSH;
909 Texture* pendulumBase, *pendulumRod, *pendulumBase2, *pendulumRod2;
910 double rodVel = 0, rodAcc = 0.3, rodAngle = 20;
912 Words *nameWords, *statusWords, *link1Words, *link2Words, *backWords, *nextWords;
913 Words** currentWords;
914 std::vector<Words*> trackWords, imageWords;
915 std::vector<Words*>* currentWordVect;
916 SDL_Rect container;
917 bool hover, cardView, click;
919 bool ecView = true;
920 bool screenRunning = true;
922 const int FPS = 30;
923 DATATYPE_MILLISECONDS systemTime;
925 int alpha;
926 int x;
927 int y;
928 int* screen;
929 int elapsed = -1;
930 int tab = 1;
931 int yClip = 0;
933 long long initial = 0;
934 long long expired = 0;
936 void runGame();
937 void gameLoop();
939 void processInput();
940 void update();
941 void play();
942 void render();
943 void close();
945 void runGame() {
946 ecView = true;
947 ImageView::backWords = &backWords;
948 backWords->changeTextFont(60, 0);
949 if (ecView) {
950 currentWordVect = &trackWords;
951 nameWords->changeText(Text::extraText.at(0));
952 statusWords->changeText(Text::extraText.at(1));
953 link1Words->changeText(Text::extraText.at(5));
955 container = { Graphics::prcnt(0.02, 'x', Items::w1),
956 Graphics::prcnt(0.18, 'y', Items::w1),
957 Graphics::prcnt(0.75, 'x', Items::w1),
958 Graphics::prcnt(0.675, 'y', Items::w1) };
959 backWords->setLocation(0.83, 0.1);
960 ecView = true;
961 gameLoop();
964 void gameLoop() {
966 screenRunning = true;
967 initial = 0;
968 expired = 0;
970 while (screenRunning) {
971 systemTime = SYSTEM_MILLISECONDS;
972 initial = systemTime.count();
974 processInput();
975 update();
976 play();
977 render();
979 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
982 close();
985 void processInput() {
986 Items::inputs = Items::mio->processKBMInput(&x, &y);
987 if (Items::inputs->at(QUIT)) {
988 screenRunning = false;
989 Items::screen = -1;
993 void update() {
994 //#define encrypt
995 #define ZERO 2
996 hover = false;
997 if (GenericGameTools::checkRectHitBox(nextWords->box, x, y)) {
998 hover = true;
999 currentWords = &nextWords;
1000 if (LCLICK) {
1001 click = true;
1002 ecView = !ecView;
1003 if (!ecView) {
1004 currentWordVect = &imageWords;
1005 nameWords->changeText(Text::extraText.at(7));
1006 statusWords->changeText(Text::extraText.at(8));
1007 link1Words->changeText(Text::extraText.at(13));
1009 else {
1010 currentWordVect = &trackWords;
1011 nameWords->changeText(Text::extraText.at(0));
1012 statusWords->changeText(Text::extraText.at(1));
1013 link1Words->changeText(Text::extraText.at(5));
1017 else if (GenericGameTools::checkRectHitBox(backWords->box, x, y)) {
1018 hover = true;
1019 currentWords = &backWords;
1020 if (LCLICK) {
1021 click = true;
1022 screenRunning = false;
1023 Items::screen = 01;
1026 else if (GenericGameTools::checkRectHitBox(link1Words->box, x, y)) {
1027 hover = true;
1028 currentWords = &link1Words;
1029 if (LCLICK) {
1030 click = true;
1031 if (ecView) {
1032 #ifdef encrypt
1033 float chara[34];
1034 std::fstream encryption;
1036 encryption.open("link.txt");
1037 char link[34] = "https://www.patreon.com/EroCorvid";
1038 int i = 0;
1039 std::cout << "\nAAA: " << link << "\n";
1040 for each(char character in link) {
1041 if (i != 34)
1042 chara[i] = ((float)(character + 4)) / 2;
1043 i++;
1045 for each(float n in chara)
1046 encryption << n << ", ";
1047 encryption.close();
1048 #endif
1049 #ifndef encrypt
1050 float chara[34] = { 54, 60, 60, 58, 59.5, 31, 25.5, 25.5, 61.5, 61.5, 61.5, 25, 58, 50.5, 60, 59, 52.5, 57.5, 57, 25, 51.5, 57.5, 56.5, 25.5, 36.5, 59, 57.5, 35.5, 57.5, 59, 61, 54.5, 52, ZERO};
1051 char link[34];
1052 int i = 0;
1053 #endif // !encrypt
1054 for each(char character in link) {
1055 link[i] = (chara[i] * 2) - 4;
1056 i++;
1059 STARTUPINFOA si;
1060 PROCESS_INFORMATION pi;
1062 ZeroMemory(&si, sizeof(si));
1063 si.cb = sizeof(si);
1064 ZeroMemory(&pi, sizeof(pi));
1066 CStringA command_line;
1067 command_line.Format("cmd.exe /c start \"link\" \"%s\"", link);
1069 CreateProcessA(NULL, // No module name (use command line)
1070 command_line.GetBuffer(),
1071 NULL, // Process handle not inheritable
1072 NULL, // Thread handle not inhberitable
1073 FALSE, // Set handle inheritance to FALSE
1074 NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, // No creation flags
1075 NULL, // Use parent's environment block
1076 NULL, // Use parent's starting directory
1077 &si, // Pointer to STARTUPINFO structure
1078 &pi); // Pointer to PROCESS_INFORMATION structure
1080 else {
1081 #ifdef encrypt
1082 float chara[35];
1083 std::fstream encryption;
1085 encryption.open("link.txt");
1086 char link[35] = "https://www.patreon.com/SunsetNiva";
1087 int i = 0;
1088 std::cout << "\nAAA: " << link << "\n";
1089 for each(char character in link) {
1090 if (i != 34)
1091 chara[i] = ((float)(character + 4)) / 2;
1092 i++;
1094 for each(float n in chara)
1095 encryption << n << ", ";
1096 encryption.close();
1097 #endif
1098 #ifndef encrypt
1099 float chara[35] = { 54, 60, 60, 58, 59.5, 31, 25.5, 25.5, 61.5, 61.5, 61.5, 25, 58, 50.5, 60, 59, 52.5, 57.5, 57, 25,
1100 51.5, 57.5, 56.5, 25.5, 43.5, 60.5, 57, 59.5, 52.5, 60, 41, 54.5, 61, 50.5,ZERO };
1101 char link[35];
1102 int i = 0;
1103 #endif // !encrypt
1104 for each(char character in link) {
1105 link[i] = (chara[i] * 2) - 4;
1106 i++;
1109 STARTUPINFOA si;
1110 PROCESS_INFORMATION pi;
1112 ZeroMemory(&si, sizeof(si));
1113 si.cb = sizeof(si);
1114 ZeroMemory(&pi, sizeof(pi));
1116 CStringA command_line;
1117 command_line.Format("cmd.exe /c start \"link\" \"%s\"", link);
1119 CreateProcessA(NULL, // No module name (use command line)
1120 command_line.GetBuffer(),
1121 NULL, // Process handle not inheritable
1122 NULL, // Thread handle not inhberitable
1123 FALSE, // Set handle inheritance to FALSE
1124 NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, // No creation flags
1125 NULL, // Use parent's environment block
1126 NULL, // Use parent's starting directory
1127 &si, // Pointer to STARTUPINFO structure
1128 &pi); // Pointer to PROCESS_INFORMATION structure
1133 else if (GenericGameTools::checkRectHitBox(link2Words->box, x, y)) {
1134 hover = true;
1135 currentWords = &link2Words;
1136 if (LCLICK) {
1137 click = true;
1138 if (ecView) {
1139 #ifdef encrypt
1140 float chara[30];
1141 std::fstream encryption;
1143 encryption.open("link.txt");
1144 char link[30] = "http://erocorvid.blogspot.ca/";
1145 int i = 0;
1146 std::cout << "\nAAA: " << link << "\n";
1147 for each(char character in link) {
1148 if (i != 29)
1149 chara[i] = ((float)(character + 4)) / 2;
1150 i++;
1152 for each(float n in chara)
1153 encryption << n;
1154 encryption.close();
1155 #endif
1156 #ifndef encrypt
1157 float chara[30] = { 54,60,60,58,31,25.5,25.5,52.5,59,57.5,51.5,57.5,59,61,54.5,52,25,51,56,57.5,53.5,59.5,58,57.5,60,25,51.5,50.5,25.5,ZERO };
1158 char link[30];
1159 int i = 0;
1160 #endif // !encrypt
1161 for each(char character in link) {
1162 link[i] = (chara[i] * 2) - 4;
1163 i++;
1166 STARTUPINFOA si;
1167 PROCESS_INFORMATION pi;
1169 ZeroMemory(&si, sizeof(si));
1170 si.cb = sizeof(si);
1171 ZeroMemory(&pi, sizeof(pi));
1173 CStringA command_line;
1174 command_line.Format("cmd.exe /c start \"link\" \"%s\"", link);
1176 CreateProcessA(NULL, // No module name (use command line)
1177 command_line.GetBuffer(),
1178 NULL, // Process handle not inheritable
1179 NULL, // Thread handle not inhberitable
1180 FALSE, // Set handle inheritance to FALSE
1181 NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, // No creation flags
1182 NULL, // Use parent's environment block
1183 NULL, // Use parent's starting directory
1184 &si, // Pointer to STARTUPINFO structure
1185 &pi); // Pointer to PROCESS_INFORMATION structure
1187 else {
1188 #ifdef encrypt
1189 float chara[22];
1190 std::fstream encryption;
1192 encryption.open("link.txt");
1193 char link[22] = "http://sunsetniva.com";
1194 int i = 0;
1195 std::cout << "\nAAA: " << link << "\n";
1196 for each(char character in link) {
1197 if (i != 20)
1198 chara[i] = ((float)(character + 4)) / 2;
1199 i++;
1201 for each(float n in chara)
1202 encryption << n << ", ";
1203 encryption.close();
1204 #endif
1205 #ifndef encrypt
1206 float chara[22] = { 54, 60, 60, 58, 31, 25.5, 25.5, 59.5, 60.5, 57, 59.5, 52.5, 60, 57, 54.5, 61, 50.5, 25, 51.5, 57.5, 56.5, ZERO };
1207 char link[22];
1208 int i = 0;
1209 #endif // !encrypt
1210 for each(char character in link) {
1211 link[i] = (chara[i] * 2) - 4;
1212 i++;
1214 STARTUPINFOA si;
1215 PROCESS_INFORMATION pi;
1217 ZeroMemory(&si, sizeof(si));
1218 si.cb = sizeof(si);
1219 ZeroMemory(&pi, sizeof(pi));
1221 CStringA command_line;
1222 command_line.Format("cmd.exe /c start \"link\" \"%s\"", link);
1224 CreateProcessA(NULL, // No module name (use command line)
1225 command_line.GetBuffer(),
1226 NULL, // Process handle not inheritable
1227 NULL, // Thread handle not inhberitable
1228 FALSE, // Set handle inheritance to FALSE
1229 NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, // No creation flags
1230 NULL, // Use parent's environment block
1231 NULL, // Use parent's starting directory
1232 &si, // Pointer to STARTUPINFO structure
1233 &pi); // Pointer to PROCESS_INFORMATION structure
1237 else {
1239 #ifdef DEMO
1240 if (GenericGameTools::checkRectHitBox(currentWordVect->at(0)->box, x, y)) {
1241 hover = true;
1242 currentWords = &currentWordVect->at(1 - 1);
1243 if (LCLICK) {
1244 if (ecView) {
1247 else {
1248 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 225);
1249 // backWords->changeTextColor(SDL_Color{ 255,255,255,255 });
1250 ImageView::runView(&CardTextures::card1);
1251 // backWords->changeTextColor(SDL_Color{ 0,0,0,255 });
1255 #endif
1256 #ifndef DEMO
1257 int i = 0;
1258 for each(Words* w in *currentWordVect) {
1259 i++;
1260 if (GenericGameTools::checkRectHitBox(w->box, x, y)) {
1261 if (ecView) {
1262 switch (i) {
1263 case 1:
1264 if (Items::userData.gate0 == -9384) {
1265 currentWords = &currentWordVect->at(i - 1);
1266 hover = true;
1268 break;
1269 case 2:
1270 if (Items::userData.gate0 == -9384) {
1271 currentWords = &currentWordVect->at(i - 1);
1272 hover = true;
1274 break;
1275 case 3:
1276 if (Items::userData.gate1 == 95631) {
1277 currentWords = &currentWordVect->at(i - 1);
1278 hover = true;
1280 break;
1281 case 4:
1282 if (Items::userData.gate4 == 991122) {
1283 currentWords = &currentWordVect->at(i - 1);
1284 hover = true;
1286 break;
1288 if (LCLICK) {
1289 switch (i) {
1290 case 1:
1291 if (Items::userData.gate0 == -9384) {
1292 Mix_VolumeMusic(MIX_MAX_VOLUME / 3);
1293 Items::bgmLibrary.Track1->play();
1294 click = true;
1296 break;
1297 case 2:
1298 if (Items::userData.gate0 == -9384) {
1299 Mix_VolumeMusic(MIX_MAX_VOLUME / 4);
1300 Items::bgmLibrary.Track2->play();
1301 click = true;
1303 break;
1304 case 3:
1305 if (Items::userData.gate1 == 95631) {
1306 Items::bgmLibrary.Track3->play();
1307 click = true;
1309 break;
1310 case 4:
1311 if (Items::userData.gate4 == 991122) {
1312 Items::bgmLibrary.Track1->play();
1313 click = true;
1315 break;
1318 break;
1320 else {
1321 switch (i) {
1322 case 1:
1323 if (Items::userData.gate0 == -9384) {
1324 currentWords = &currentWordVect->at(i - 1);
1325 hover = true;
1327 break;
1328 case 2:
1329 if (Items::userData.gate1 == 95631) {
1330 currentWords = &currentWordVect->at(i - 1);
1331 hover = true;
1333 break;
1334 case 3:
1335 if (Items::userData.gate2 == 1095651) {
1336 currentWords = &currentWordVect->at(i - 1);
1337 hover = true;
1339 break;
1340 case 4:
1341 if (Items::userData.gate3 == 20276) {
1342 currentWords = &currentWordVect->at(i - 1);
1343 hover = true;
1345 break;
1348 if (LCLICK) {
1349 switch (i) {
1350 case 1:
1351 if (Items::userData.gate0 == -9384) {
1352 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 225);
1353 // backWords->changeTextColor(SDL_Color{ 255,255,255,255 });
1354 ImageView::runView(&Items::menuGraphics.card1);
1355 // backWords->changeTextColor(SDL_Color{ 0,0,0,255 });
1356 click = true;
1358 break;
1359 case 2:
1360 if (Items::userData.gate1 == 95631) {
1361 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 225);
1362 // backWords->changeTextColor(SDL_Color{ 255,255,255,255 });
1363 ImageView::runView(&Items::menuGraphics.card2);
1364 // backWords->changeTextColor(SDL_Color{ 0,0,0,255 });
1365 click = true;
1367 break;
1368 case 3:
1369 if (Items::userData.gate2 == 1095651) {
1370 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 225);
1371 // backWords->changeTextColor(SDL_Color{ 255,255,255,255 });
1372 ImageView::runView(&Items::menuGraphics.card3);
1373 // backWords->changeTextColor(SDL_Color{ 0,0,0,255 });
1374 click = true;
1376 break;
1377 case 4:
1378 if (Items::userData.gate3 == 20276) {
1379 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 225);
1380 // backWords->changeTextColor(SDL_Color{ 255,255,255,255 });
1381 ImageView::runView(&Items::menuGraphics.card4);
1382 // backWords->changeTextColor(SDL_Color{ 0,0,0,255 });
1383 click = true;
1385 break;
1391 #endif // ! DEMO
1394 void play() {
1395 if (click) {
1396 Items::sfxLibrary.ClickSFX->playSFX();
1397 click = false;
1401 void render() {
1402 SDL_RenderClear(Items::r1);
1404 Items::menuGraphics.ExtraBG->renderTexture();
1406 if (rodAngle < 0) rodVel += rodAcc;
1407 else if (rodAngle >= 0) rodVel -= rodAcc;
1408 rodAngle += rodVel;
1410 if (ecView) {
1411 //containerTextureEC->renderTexture();
1412 Items::menuGraphics.pendulumRod->renderTextureRotate(rodAngle);
1413 Items::menuGraphics.pendulumBase->renderTexture();
1416 else {
1417 //containerTextureSH->renderTexture();
1418 Items::menuGraphics.pendulumRod2->renderTextureRotate(rodAngle);
1419 Items::menuGraphics.pendulumBase2->renderTexture();
1422 Items::menuGraphics.ExtraBGHolder->renderTexture();
1424 if (hover) {
1425 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
1426 SDL_Rect box = {
1427 (**currentWords).box.x - Graphics::prcnt(0.005, 'x', Items::w1),
1428 (**currentWords).box.y - Graphics::prcnt(0.005, 'y', Items::w1),
1429 (**currentWords).box.w + Graphics::prcnt(0.01, 'x', Items::w1),
1430 (**currentWords).box.h + Graphics::prcnt(0.01, 'y', Items::w1)
1432 SDL_RenderFillRect(Items::r1, &box);
1435 nameWords->renderTexture();
1436 statusWords->renderTexture();
1437 nextWords->renderTexture();
1438 backWords->renderTexture();
1440 int i = 0;
1441 SDL_Color grey = { 125,125,125,255 };
1442 for each(Words* w in *currentWordVect) {
1443 i++;
1444 if (ecView) {
1445 switch (i) {
1446 case 1:
1447 if (Items::userData.gate0 == -9384) {
1448 w->renderTexture();
1450 else {
1451 w->renderWords(grey);
1453 break;
1454 case 2:
1455 if (Items::userData.gate0 == -9384) {
1456 w->renderTexture();
1458 else {
1459 w->renderWords(grey);
1461 break;
1462 case 3:
1463 if (Items::userData.gate1 == 95631) {
1464 w->renderTexture();
1466 else {
1467 w->renderWords(grey);
1469 break;
1470 case 4:
1471 if (Items::userData.gate4 == 991122) {
1472 w->renderTexture();
1474 else {
1475 w->renderWords(grey);
1477 break;
1480 else {
1481 switch (i) {
1482 case 1:
1483 if (Items::userData.gate0 == -9384) {
1484 w->renderTexture();
1486 else {
1487 w->renderWords(grey);
1489 break;
1490 case 2:
1491 if (Items::userData.gate1 == 95631) {
1492 w->renderTexture();
1494 else {
1495 w->renderWords(grey);
1497 break;
1498 case 3:
1499 if (Items::userData.gate2 == 1095651) {
1500 w->renderTexture();
1502 else {
1503 w->renderWords(grey);
1505 break;
1506 case 4:
1507 if (Items::userData.gate3 == 20276) {
1508 w->renderTexture();
1510 else {
1511 w->renderWords(grey);
1513 break;
1515 #ifdef DEMO
1516 if (i != 1)
1517 Items::blockX->renderTexture(w->box);
1518 #endif
1523 link1Words->renderTexture();
1524 link2Words->renderTexture();
1526 //SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 255);
1527 //SDL_RenderDrawRect(Items::r1, &container);
1528 SDL_SetRenderDrawColor(Items::r1, 255, 255, 255, 255);
1530 SDL_RenderPresent(Items::r1);
1532 void close() {
1538 PROCESS_INFORMATION pi;
1539 STARTUPINFO si;
1540 CreateProcess("c:\\Program Files\\Internet Explorer\\iexplore.exe",
1541 "iexplore.exe www.yahoo.com", NULL, NULL, FALSE,
1542 CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi);
1545 STARTUPINFOA si;
1546 PROCESS_INFORMATION pi;
1548 ZeroMemory(&si, sizeof(si));
1549 si.cb = sizeof(si);
1550 ZeroMemory(&pi, sizeof(pi));
1552 CStringA command_line;
1553 command_line.Format("cmd.exe /c start \"link\" \"%s\"", "http://www.google.com");
1555 if (!CreateProcessA(NULL, // No module name (use command line)
1556 command_line.GetBuffer(),
1557 NULL, // Process handle not inheritable
1558 NULL, // Thread handle not inhberitable
1559 FALSE, // Set handle inheritance to FALSE
1560 NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, // No creation flags
1561 NULL, // Use parent's environment block
1562 NULL, // Use parent's starting directory
1563 &si, // Pointer to STARTUPINFO structure
1564 &pi) // Pointer to PROCESS_INFORMATION structure
1567 TRACE("CreateProcess failed (%d).\n", GetLastError());
1568 return;
1573 namespace Menu {
1575 bool screenRunning = true;
1577 bool playGenericClick;
1578 bool playGenericHover;
1579 bool playHoverDone;
1581 bool hoverPlay, clickPlay
1582 , hoverExtra, clickExtra
1583 , hoverQuit, clickQuit;
1585 const int FPS = 60;
1586 DATATYPE_MILLISECONDS systemTime;
1588 double roation = 0;
1590 int alpha;
1591 int x;
1592 int y;
1593 int* screen;
1594 int elapsed = -1;
1595 int tab = 1;
1596 int yClip = 0;
1598 long long initial = 0;
1599 long long expired = 0;
1601 Texture* MenuBG, *Title, *Z1, *Z2, *Z3;
1603 Words* PlayWords, *ExtraWords, *QuitWords, *versWords;
1605 void runGame();
1606 void gameLoop();
1608 void processInput();
1609 void update();
1610 void play();
1611 void render();
1612 void close();
1614 void runGame() {
1615 alpha = 0;
1616 GenericGameTools::reset();
1617 gameLoop();
1620 void gameLoop() {
1622 screenRunning = true;
1623 initial = 0;
1624 expired = 0;
1625 versWords = new Words(32, 0, "EroSomnia - TMP: Version 0.2.1", 0.02, 0.95, Items::r1, Items::w1);
1626 while (screenRunning) {
1627 systemTime = SYSTEM_MILLISECONDS;
1628 initial = systemTime.count();
1630 processInput();
1631 update();
1632 play();
1633 render();
1635 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
1638 close();
1641 void processInput() {
1642 Items::inputs = Items::mio->processKBMInput(&x, &y);
1644 void update() {
1645 if (Items::inputs->at(QUIT)) {
1646 screenRunning = false;
1647 Items::screen = -1;
1649 hoverPlay = false;
1650 hoverExtra = false;
1651 hoverQuit = false;
1653 if (GenericGameTools::checkRectHitBox(PlayWords->box, x, y)) {
1654 hoverPlay = true;
1655 if (LCLICK && !clickPlay) {
1656 GenericGameTools::reset();
1657 clickPlay = true;
1660 if (GenericGameTools::checkRectHitBox(ExtraWords->box, x, y)) {
1661 hoverExtra = true;
1662 if (LCLICK && !clickPlay) {
1663 GenericGameTools::reset();
1664 clickExtra = true;
1667 if (GenericGameTools::checkRectHitBox(QuitWords->box, x, y)) {
1668 hoverQuit = true;
1669 if (LCLICK && !clickPlay) {
1670 GenericGameTools::reset();
1671 clickQuit = true;
1676 void play() {
1677 playGenericHover = false;
1678 playHoverDone = true;
1680 if (LCLICK && (clickPlay || clickExtra || clickQuit) && !playGenericClick) {
1681 Items::sfxLibrary.ClickSFX->playSFX();
1682 playGenericClick = true;
1685 double z1Rotate, z2Rotate, z3Rotate, tRotate;
1686 double z1Vel = 0.5, z2Vel = 0.25, z3Vel = 1, tVel = 0.1;
1687 double z1Acc = 0.01, z2Acc = 0.01, z3Acc = 0.01, tAcc = 0.001;
1688 bool rR1, rR2, rR3;
1689 void render() {
1691 SDL_RenderClear(Items::r1);
1693 if (z1Rotate < 0) {
1694 rR1 = true;
1695 z1Vel += z1Acc;
1697 else if (z1Rotate >= 0) {
1698 rR1 = false;
1699 z1Vel -= z1Acc;
1701 z1Rotate += z1Vel;
1703 if (z2Rotate < 0) {
1704 rR1 = true;
1705 z2Vel += z2Acc;
1707 else if (z2Rotate >= 0) {
1708 rR1 = false;
1709 z2Vel -= z2Acc;
1711 z2Rotate += z2Vel;
1713 if (z3Rotate < 0) {
1714 rR3 = true;
1715 z3Vel += z3Acc;
1717 else if (z3Rotate >= 0) {
1718 rR3 = false;
1719 z3Vel -= z3Acc;
1721 z3Rotate += z3Vel;
1723 if (tRotate < 0) {
1724 tVel += tAcc;
1726 else if (tRotate >= 0) {
1727 tVel -= tAcc;
1729 tRotate += tVel;
1731 Items::menuGraphics.MenuBG->renderTexture();
1732 Items::menuGraphics.Title->renderTextureRotate(tRotate);
1733 Items::menuGraphics.Z1->renderTextureRotate(z1Rotate);
1734 Items::menuGraphics.Z2->renderTextureRotate(z2Rotate);
1735 Items::menuGraphics.Z3->renderTextureRotate(z3Rotate);
1737 if (hoverPlay) {
1738 //Make it ambiguous through pointers
1739 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
1740 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
1741 SDL_Rect smallBox = SDL_Rect{
1742 PlayWords->box.x - Graphics::prcnt(0.05, 'x', Items::w1),
1743 PlayWords->box.y - Graphics::prcnt(0.05, 'y', Items::w1),
1744 PlayWords->box.w + Graphics::prcnt(0.1, 'x', Items::w1),
1745 PlayWords->box.h + Graphics::prcnt(0.1, 'y', Items::w1)
1747 SDL_RenderFillRect(Items::r1, &smallBox);
1749 if (hoverExtra) {
1750 //Make it ambiguous through pointers
1751 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
1752 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
1753 SDL_Rect smallBox = SDL_Rect{
1754 ExtraWords->box.x - Graphics::prcnt(0.05, 'x', Items::w1),
1755 ExtraWords->box.y - Graphics::prcnt(0.05, 'y', Items::w1),
1756 ExtraWords->box.w + Graphics::prcnt(0.1, 'x', Items::w1),
1757 ExtraWords->box.h + Graphics::prcnt(0.1, 'y', Items::w1)
1759 SDL_RenderFillRect(Items::r1, &smallBox);
1761 if (hoverQuit) {
1762 //Make it ambiguous through pointers
1763 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
1764 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
1765 SDL_Rect smallBox = SDL_Rect{
1766 QuitWords->box.x - Graphics::prcnt(0.05, 'x', Items::w1),
1767 QuitWords->box.y - Graphics::prcnt(0.05, 'y', Items::w1),
1768 QuitWords->box.w + Graphics::prcnt(0.1, 'x', Items::w1),
1769 QuitWords->box.h + Graphics::prcnt(0.1, 'y', Items::w1)
1771 SDL_RenderFillRect(Items::r1, &smallBox);
1774 //PlayWords->renderOutlineAndWords();
1775 PlayWords->renderOutlineAndWords();
1776 ExtraWords->renderTexture();
1777 QuitWords->renderTexture();
1779 if (clickPlay) {
1780 alpha = GenericGameTools::incrementAtRate(0, 255, 500);
1781 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
1782 SDL_Rect largeBox = SDL_Rect{
1783 Graphics::prcnt(0, 'x', Items::w1),
1784 Graphics::prcnt(0, 'y', Items::w1),
1785 Graphics::prcnt(1, 'x', Items::w1),
1786 Graphics::prcnt(1, 'y', Items::w1)
1788 SDL_RenderFillRect(Items::r1, &largeBox);
1789 if (alpha >= 255) {
1790 screenRunning = false;
1791 Items::screen = 02;
1794 else if (clickExtra) {
1795 alpha = GenericGameTools::incrementAtRate(0, 255, 200);
1796 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
1797 SDL_Rect largeBox = SDL_Rect{
1798 Graphics::prcnt(0, 'x', Items::w1),
1799 Graphics::prcnt(0, 'y', Items::w1),
1800 Graphics::prcnt(1, 'x', Items::w1),
1801 Graphics::prcnt(1, 'y', Items::w1)
1803 SDL_RenderFillRect(Items::r1, &largeBox);
1804 if (alpha >= 255) {
1805 screenRunning = false;
1806 Items::screen = 03;
1809 else if (clickQuit) {
1810 alpha = GenericGameTools::incrementAtRate(0, 255, 800);
1811 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
1812 SDL_Rect largeBox = SDL_Rect{
1813 Graphics::prcnt(0, 'x', Items::w1),
1814 Graphics::prcnt(0, 'y', Items::w1),
1815 Graphics::prcnt(1, 'x', Items::w1),
1816 Graphics::prcnt(1, 'y', Items::w1)
1818 SDL_RenderFillRect(Items::r1, &largeBox);
1819 if (alpha >= 255) {
1820 screenRunning = false;
1821 Items::screen = -1;
1825 versWords->renderTexture();
1827 SDL_SetRenderDrawColor(Items::r1, 255, 255, 255, 000);
1828 SDL_RenderPresent(Items::r1);
1831 void close() {
1832 clickPlay = false;
1833 clickExtra = false;
1834 clickQuit = false;
1835 playGenericClick = false;
1836 alpha = 0;
1839 //Black fade in from OSeq
1840 //whiteflash fadinto menuBG
1845 namespace DefaultGame {
1847 bool screenRunning = true;
1848 bool lOpen = false;
1849 bool rOpen = false;
1850 bool errorSound, levelSound, levelSoundHold;
1851 //max event probablilty
1852 //float sfxChance = ; //99.9% in 1800 frames
1853 //int sfxRange = 100000; // the mod of a rand
1854 int sfxCutOff = 25; // the bound
1855 // random of 100,000 is less than cutoff
1857 int passingCutoff_4 = 25;
1858 int hornCutoff_3 = 19;
1859 int commsCutoff_2 = 13;
1860 int bangCutoff_1 = 7;
1862 int promptMsgSize = 50;
1863 int promptYesNoSize = 60;
1865 bool hoverNotThatOne, hoverLeft, hoverRight, hoverUDL, hoverUDR, hoverR, hoverL, hoverSel1, hoverSel2, hoverSel3, hoverCHCl3, hoverInce;
1867 bool playGenericClick;
1868 bool playGenericHover;
1869 bool rngSFXPlaying;
1871 bool chloroClick;
1872 bool inceClick;
1874 bool moSel = true, piSel, fiSel,
1875 haSel, thSel, brSel,
1876 maSel, feSel, xxSel,
1877 blSel, tieSel, shirtSel,
1878 skSel, paSel, thiSel;
1879 bool* curSel = &moSel;
1880 bool moAni = false, lPinchAni, rPinchAni, fiAni,
1881 haAni, thAni, brAni, noBrAni,
1882 maAni, feAni, xxAni;
1884 bool blOn = true, tieOn = true, shirtOn = true,
1885 skOn = true, paOn = true, thiOn = true;
1886 //boolblOn = false, tieOn = false, shirtOn = false,
1887 // skOn = false, paOn = false, thiOn = false;
1889 int blFade = 255, tieFade = 255, tieTopFade = 0, shirtFade = 255,
1890 skFade = 255, paFade = 255, moisFade = 255, thiFade = 255;
1892 int semHaFade = 0, semMoFade = 0, semBrFade = 0, semStoFade = 0, semLegFade = 0;
1893 bool semHaActive = false, semMoActive = false, semBrActive = false, semStoActive = false, semLegActive = false;
1895 bool moBuy = false, niBuy, fiBuy,
1896 haBuy, thBuy, brBuy,
1897 maBuy, feBuy, xxBuy,
1898 blBuy = false, tieBuy = false, shirtBuy = false,
1899 skBuy, paBuy, thiBuy;
1901 /*bool moBuy = true, niBuy= true, fiBuy= true,
1902 haBuy= true, thBuy= true, brBuy= true,
1903 maBuy= true, feBuy= true, xxBuy= true,
1904 blBuy = true, tieBuy = true, shirtBuy = true,
1905 skBuy = true, paBuy = true, thiBuy = true;
1907 int moPrice = 100, niPrice = 400, fiPrice = 400,
1908 haPrice = 200, thPrice = 200, brPrice = 400,
1909 maPrice = 400, fePrice = 400, xxPrice = 800,
1910 blPrice = 100, tiePrice = 50, shirtPrice = 300,
1911 skPrice = 200, paPrice = 300, thiPrice = 50;
1913 int FPS = 30;
1915 int mFad = 0;
1916 double fadeRate;
1917 DATATYPE_MILLISECONDS systemTime;
1919 int alpha;
1920 int x;
1921 int y;
1922 int* screen;
1923 int elapsed = -1;
1924 int tab = 1;
1925 int yClip = 0;
1927 int moHitBoxX, moHitBoxY;
1929 SDL_Rect haHitBox1, haHitBox2, haHitBox3, haHitBox4;
1930 SDL_Rect breastHitBox;
1932 int lpHitBoxX, lpHitBoxY;
1933 int rpHitBoxX, rpHitBoxY;
1934 int fiHitBoxX, fiHitBoxY;
1935 int thiHitBoxX, thiHitBoxY;
1937 double chary = 0;
1939 long long startTime;
1940 long long initial = 0;
1941 long long expired = 0;
1943 std::string pointsString;
1945 Texture* MainBG, *Character;
1946 Texture* UDArrowL, *UDArrowR, *RArrow, *StatsLogo, *ToolsLogo, *BoxOLH, *BoxOLV, *BoxOLSel, *BoxBGH, *BoxBGV, *BoxBGSel1, *BoxBGSel2, *BoxBGSel3
1947 , *BoxBGSel4, *BoxBGSel5, *BoxFullChloro, *BoxFullIncence, *BoxMainBGR, *BoxMainBGL, *TextBlazer, *TextBreast, *TextShirt, *TextFellatio, *TextHair
1948 , *TextMasturbation, *TextMouth, *TextNipples, *TextPanties, *TextSkirt, *TextThighHigh, *TextThigh, *TextTie, *TextVagina, *TextXXX;
1950 Words* Tab1Words, *Tab2Words, *Tab3Words, *Tab4Words, *Tab5Words, *ExperienceWords, *AwarenessWords, *PointsWords, *ChloroformWords, *ChloroformTipWords,
1951 *Incenence, *IncenceTipWords,
1952 *moTip, *niTip, *fiTip, *haTip, *thTip, *brTip, *maTip, *feTip, *xxTip, *blTip, *toTip, *skTip, *braTip, *paTip, *thhTip,
1953 *ChTip, *IncTip, *ScrollTip,
1954 *BuyWords, *DemoWords, *PriceWords
1958 SDL_Rect largeBoxSel1, largeBoxSel2, largeBoxSel3;
1960 void runGame();
1961 void gameLoop();
1963 void processInput();
1964 void update();
1965 void play();
1966 void render();
1967 void close();
1968 void reset();
1969 bool moisture;
1970 int moisAlpha;
1971 int scrollRate;
1972 double scrlPrcnt = 0.08;
1973 double sleepModifier = 1.0, pointModifier = 1.0, expModifier = 1.0, sleepDecMod = 1.0;
1974 int expPoints, expCounter, expCounterGain = 1, expTimer, gainLimiter;
1975 double awareCounter;
1976 double countdownTimer, timerStart;
1977 void calculatePoints(int expMS, int awareMS, bool gain) {
1978 int expGain = 10000 / (((double)expMS / 1000.0) * 30);
1979 int awareGain = 10000 / (((double)awareMS / 1000.0) * 30);
1980 //std::cout << expGain<<" " << awareGain<< "\n" << expCounter << " " << awareCounter <<"\n";
1981 if (gain) expCounter += expGain * expModifier;
1982 if (expCounter > 10000) {
1983 gainLimiter++;
1984 if (gainLimiter > 3) {
1985 levelSound = true;
1986 expPoints += expCounterGain * 10 * pointModifier;
1987 gainLimiter = 0;
1989 expTimer++;
1990 if (expTimer > 1250 / FPS) {
1991 levelSound = false;
1992 levelSoundHold = false;
1993 expTimer = 0;
1994 expCounter = 0;
1997 if (gain) awareCounter += awareGain * sleepModifier;
1998 else if (awareCounter > 0) awareCounter -= 12 * sleepDecMod;
2001 bool hover;
2002 bool start = false;
2003 bool ctrlClick = false;
2004 bool lightfx = false;
2006 int wallX, wallY, bgX, bgY;
2007 int wallH, wallW, bgH, bgW;
2009 SDL_Rect torso;
2010 SDL_Rect head;
2011 SDL_Rect lArm;
2012 SDL_Rect rArm;
2013 SDL_Rect pelvis;
2014 SDL_Rect lLeg;
2015 SDL_Rect rLeg;
2016 double larmY, rArmY, lLegY, rLegY;
2017 bool neutralSFX = false;
2018 //#define HBOX
2020 void reset() {
2021 neutralSFX = false;
2022 sleepDecMod = 1.0;
2023 hover = false;
2024 moisture = false;
2025 moisAlpha = 0;
2026 alpha = 0;
2027 Items::bgmLibrary.TrainBG->playFadeIn(-1, 1000);
2028 Items::sfxLibrary.startSFX->playSFX();
2029 //Mix_VolumeChunk(Items::sfxLibrary.PassingSFX->sfx, SDL_MIX_MAXVOLUME);
2030 Mix_VolumeChunk(Items::sfxLibrary.IntercomSFX->sfx, 80);
2031 Mix_VolumeChunk(Items::sfxLibrary.bangSFX->sfx, 70);
2033 scrollRate = Graphics::prcnt(scrlPrcnt - 0.04, 'y', Items::w1);
2035 screenRunning = true;
2036 lOpen = false;
2037 rOpen = false;
2039 moSel = true;
2040 piSel = false; fiSel = false;
2041 haSel = false; thSel = false; brSel = false;
2042 maSel = false; feSel = false; xxSel = false;
2043 blSel = false; tieSel = false; shirtSel = false;
2044 skSel = false; paSel = false; thiSel = false;
2045 moAni = false, lPinchAni = false, rPinchAni = false, fiAni = false,
2046 haAni = false, thAni = false, brAni = false, noBrAni = false,
2047 maAni = false, feAni = false, xxAni = false;
2049 blOn = true, tieOn = true, shirtOn = true,
2050 skOn = true, paOn = true, thiOn = true;
2052 blFade = 255, tieFade = 255, tieTopFade = 0, shirtFade = 255,
2053 skFade = 255, paFade = 255, moisFade = 255, mFad = 0, thiFade = 255;
2054 semHaFade = 0, semMoFade = 0, semBrFade = 0, semStoFade = 0, semLegFade = 0;
2055 semHaActive = false, semMoActive = false, semBrActive = false, semStoActive = false, semLegActive = false;
2057 moBuy = false, niBuy = false, fiBuy = false,
2058 haBuy = false, thBuy = false, brBuy = false,
2059 maBuy = false, feBuy = false, xxBuy = false,
2060 blBuy = false, tieBuy = false, shirtBuy = false,
2061 skBuy = false, paBuy = false, thiBuy = false;
2064 if (Items::gameMode == 1) {//free
2065 moBuy = true, niBuy = true, fiBuy = true,
2066 haBuy = true, thBuy = true, brBuy = true,
2067 maBuy = true, feBuy = true, xxBuy = true,
2068 blBuy = true, tieBuy = true, shirtBuy = true,
2069 skBuy = true, paBuy = true, thiBuy = true;
2070 sleepModifier = 0;
2071 pointModifier = 0;
2072 expModifier = 0;
2074 else if (Items::gameMode == 2) {//reg
2075 moBuy = false, niBuy = false, fiBuy = false,
2076 haBuy = false, thBuy = false, brBuy = false,
2077 maBuy = false, feBuy = false, xxBuy = false,
2078 blBuy = false, tieBuy = false, shirtBuy = false,
2079 skBuy = false, paBuy = false, thiBuy = false;
2080 sleepModifier = 1.0;
2081 pointModifier = 1.0;
2082 expModifier = 1.0;
2084 else if (Items::gameMode == 3) {//time
2085 moBuy = true, niBuy = false, fiBuy = false,
2086 haBuy = false, thBuy = false, brBuy = false,
2087 maBuy = false, feBuy = false, xxBuy = false,
2088 blBuy = false, tieBuy = false, shirtBuy = false,
2089 skBuy = false, paBuy = false, thiBuy = false;
2090 sleepModifier = 1.0;
2091 pointModifier = 1.5;
2092 expModifier = 1.0;
2095 else if (Items::gameMode == 4) {//hard
2096 moBuy = false, niBuy = false, fiBuy = false,
2097 haBuy = false, thBuy = false, brBuy = false,
2098 maBuy = false, feBuy = false, xxBuy = false,
2099 blBuy = false, tieBuy = false, shirtBuy = false,
2100 skBuy = false, paBuy = false, thiBuy = false;
2101 sleepModifier = 1.0;
2102 pointModifier = 1.2;
2103 expModifier = 1.0;
2107 hoverInce = hoverCHCl3 = false;
2109 startTime = 0;
2110 initial = 0;
2111 expired = 0;
2113 start = false;
2114 ctrlClick = false;
2115 lightfx = false;
2117 awareCounter = 0;
2118 expCounter = 0;
2119 expPoints = 0;
2121 Items::animationLibrary.pokeFake->clearFrames();
2122 Items::animationLibrary.handFake->clearFrames();
2123 Items::gameGraphics.TextWall->resetTimer();
2124 Items::gameGraphics.TextWall->setTransparency(255);
2125 Items::gameGraphics.TextWall->box.x = wallX;
2126 Items::gameGraphics.TextWall->box.y = wallY;
2127 Items::gameGraphics.TextWall->box.w = wallW;
2128 Items::gameGraphics.TextWall->box.h = wallH;
2129 Items::gameGraphics.TextBG->resetTimer();
2130 Items::gameGraphics.TextBG->box.x = bgX;
2131 Items::gameGraphics.TextBG->box.y = bgY;
2132 Items::gameGraphics.TextBG->box.w = bgW;
2133 Items::gameGraphics.TextBG->box.h = bgH;
2134 alpha = 0;
2135 startTime = SDL_GetTicks();
2136 GenericGameTools::reset();
2137 timerStart = SDL_GetTicks();
2140 int bxOffset;
2141 int xOffSet;
2142 int failStartTime;
2143 void runGame() {
2144 sleepDecMod = 1.0;
2145 hover = false;
2146 moisture = false;
2147 moisAlpha = 0;
2148 alpha = 0;
2149 Items::bgmLibrary.TrainBG->playFadeIn(-1, 1000);
2150 //Mix_VolumeChunk(Items::sfxLibrary.PassingSFX->sfx, SDL_MIX_MAXVOLUME);
2151 Mix_VolumeChunk(Items::sfxLibrary.IntercomSFX->sfx, 60);
2152 Mix_VolumeChunk(Items::sfxLibrary.bangSFX->sfx, 70);
2153 Mix_VolumeChunk(Items::sfxLibrary.neutSFX->sfx, 40);
2155 bxOffset = Graphics::prcnt(0.0265, 'x', Items::w1);
2156 xOffSet = Graphics::prcnt(0.0425, 'x', Items::w1);
2158 largeBoxSel1 = { Items::gameGraphics.BoxBGSel1->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
2159 Items::gameGraphics.BoxBGSel1->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
2160 Items::gameGraphics.BoxBGSel1->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
2161 Items::gameGraphics.BoxBGSel1->box.h + Graphics::prcnt(0.01, 'y', Items::w1) };
2162 largeBoxSel2 = { Items::gameGraphics.BoxBGSel2->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
2163 Items::gameGraphics.BoxBGSel2->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
2164 Items::gameGraphics.BoxBGSel2->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
2165 Items::gameGraphics.BoxBGSel2->box.h + Graphics::prcnt(0.01, 'y', Items::w1) };
2166 largeBoxSel3 = { Items::gameGraphics.BoxBGSel3->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
2167 Items::gameGraphics.BoxBGSel3->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
2168 Items::gameGraphics.BoxBGSel3->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
2169 Items::gameGraphics.BoxBGSel3->box.h + Graphics::prcnt(0.01, 'y', Items::w1) };
2171 scrollRate = Graphics::prcnt(scrlPrcnt - 0.04, 'y', Items::w1);
2173 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
2175 haHitBox1.x = Graphics::prcnt(0.60, 'x', Items::w1); haHitBox1.y = Graphics::prcnt(0.4575, 'y', Items::w1) - yClip * scrollRate, haHitBox1.w = Graphics::prcnt(0.170, 'x', Items::w1); haHitBox1.h = Graphics::prcnt(0.11, 'y', Items::w1);
2176 haHitBox2.x = Graphics::prcnt(0.355, 'x', Items::w1); haHitBox2.y = Graphics::prcnt(0.289, 'y', Items::w1) - yClip * scrollRate, haHitBox2.w = Graphics::prcnt(0.1535, 'x', Items::w1); haHitBox2.h = Graphics::prcnt(0.22, 'y', Items::w1);
2177 haHitBox3.x = Graphics::prcnt(0.425, 'x', Items::w1); haHitBox3.y = Graphics::prcnt(0.12, 'y', Items::w1) - yClip * scrollRate, haHitBox3.w = Graphics::prcnt(0.35, 'x', Items::w1); haHitBox3.h = Graphics::prcnt(0.17, 'y', Items::w1);
2178 haHitBox4.x = Graphics::prcnt(0.7, 'x', Items::w1); haHitBox4.y = Graphics::prcnt(0.289, 'y', Items::w1) - yClip * scrollRate, haHitBox4.w = Graphics::prcnt(0.118, 'x', Items::w1); haHitBox4.h = Graphics::prcnt(0.17, 'y', Items::w1);
2180 breastHitBox.x = Graphics::prcnt(0.27, 'x', Items::w1); breastHitBox.y = Graphics::prcnt(0.63, 'y', Items::w1) - yClip * scrollRate;;
2181 breastHitBox.w = Graphics::prcnt(0.4, 'x', Items::w1); breastHitBox.h = Graphics::prcnt(0.25, 'y', Items::w1);
2183 thiHitBoxX = Graphics::prcnt(0.64, 'x', Items::w1);;
2184 thiHitBoxY = Graphics::prcnt(1.43 - yClip * scrlPrcnt, 'y', Items::w1);;
2185 lpHitBoxX = Graphics::prcnt(0.32, 'x', Items::w1); lpHitBoxY = Graphics::prcnt(0.814, 'y', Items::w1) - yClip * scrollRate;
2186 rpHitBoxX = Graphics::prcnt(0.53, 'x', Items::w1); rpHitBoxY = Graphics::prcnt(0.852, 'y', Items::w1) - yClip * scrollRate;
2187 fiHitBoxX = Graphics::prcnt(0.4, 'x', Items::w1); fiHitBoxY = Graphics::prcnt(1.15, 'y', Items::w1) - yClip * scrollRate;
2189 head = { Graphics::prcnt(0.355, 'x', Items::w1), Graphics::prcnt(0.12,'y', Items::w1) ,Graphics::prcnt(0.455, 'x', Items::w1) ,Graphics::prcnt(1.0, 'y', Items::w1) };
2190 torso = { Graphics::prcnt(0.28, 'x', Items::w1), Graphics::prcnt(0.67,'y', Items::w1) ,Graphics::prcnt(0.075, 'x', Items::w1) ,Graphics::prcnt(0.45, 'y', Items::w1) };
2191 pelvis = { Graphics::prcnt(0.22, 'x', Items::w1), Graphics::prcnt(0.90,'y', Items::w1) ,Graphics::prcnt(0.07, 'x', Items::w1) ,Graphics::prcnt(0.23, 'y', Items::w1) };
2192 larmY = 1.05;
2193 lArm = { Graphics::prcnt(0.08, 'x', Items::w1), Graphics::prcnt(larmY,'y', Items::w1) ,Graphics::prcnt(0.142, 'x', Items::w1) ,Graphics::prcnt(0.09, 'y', Items::w1) };
2194 rArmY = 1.12;
2195 rArm = { Graphics::prcnt(0.73, 'x', Items::w1), Graphics::prcnt(rArmY,'y', Items::w1) ,Graphics::prcnt(0.215, 'x', Items::w1) ,Graphics::prcnt(0.13, 'y', Items::w1) };
2196 lLegY = 1.10;
2197 lLeg = { Graphics::prcnt(0.125, 'x', Items::w1), Graphics::prcnt(lLegY,'y', Items::w1) ,Graphics::prcnt(0.56, 'x', Items::w1) ,Graphics::prcnt(0.24, 'y', Items::w1) };
2198 rLegY = 1.32;
2199 rLeg = { Graphics::prcnt(0.07, 'x', Items::w1), Graphics::prcnt(rLegY,'y', Items::w1) ,Graphics::prcnt(0.50, 'x', Items::w1) ,Graphics::prcnt(0.18, 'y', Items::w1) };
2201 Items::animationLibrary.moAni->setLocations(0.4317, 0.42075 - yClip * scrlPrcnt);
2202 Items::animationLibrary.haAni->setLocations(0.42207, 0.10805 - yClip * scrlPrcnt);
2203 Items::animationLibrary.lPiAni->setLocations(0.1244150, 0.565890 - yClip * scrlPrcnt);
2204 Items::animationLibrary.lPiAni->currentPosition = 22;
2205 Items::animationLibrary.rPiAni->setLocations(0.3511625, 0.6492 - yClip * scrlPrcnt);
2206 Items::animationLibrary.lPiAni->currentPosition = 14;
2207 Items::animationLibrary.fiAni->setLocations(0.055, 0.95 - yClip * scrlPrcnt);
2208 Items::animationLibrary.idleAni->setLocations(0.508 - 0.004808, 0.3095 - yClip * scrlPrcnt);
2210 Items::animationLibrary.eyesAni->setLocations(0.470, 0.290 - yClip * scrlPrcnt);
2211 Items::animationLibrary.felAni->setLocations(0.4734, 0.4220 - yClip * scrlPrcnt);
2212 Items::animationLibrary.masAni->setLocations(0.0, -yClip * scrlPrcnt);
2214 Items::animationLibrary.noBreAni->setLocations(0.25, 0.565 - yClip * scrlPrcnt);
2215 Items::animationLibrary.breAni->setLocations(0.27410, 0.45265 - yClip * scrlPrcnt);
2217 Items::animationLibrary.thiAni->setLocations(0.508 - 0.004808, 0.3095 - yClip * scrlPrcnt);
2219 for each(Texture* fr in Items::animationLibrary.eyesAni->frames) {
2220 fr->box.w *= 1.044660194174757;
2221 fr->box.h *= 1.044660194174757;
2223 for each(Texture* fr in Items::animationLibrary.felAni->frames) {
2224 fr->box.w *= 1.070;
2225 fr->box.h *= 1.070;
2227 for each(Texture* fr in Items::animationLibrary.masAni->frames) {
2228 fr->box.w *= 1.070;
2229 fr->box.h *= 1.070;
2231 for each(Texture* fr in Items::animationLibrary.noBreAni->frames) {
2232 fr->box.w *= 1.044660194174757;
2233 fr->box.h *= 1.044660194174757;
2235 for each(Texture* fr in Items::animationLibrary.breAni->frames) {
2236 fr->box.w *= 1.044660194174757;
2237 fr->box.h *= 1.044660194174757;
2239 for each(Texture* fr in Items::animationLibrary.thiAni->frames) {
2240 fr->box.w *= 1.070;
2241 fr->box.h *= 1.070;
2243 for each(Texture* fr in Items::animationLibrary.idleAni->frames) {
2244 fr->box.w *= 1.084660194174757;
2245 fr->box.h *= 1.084660194174757;
2247 for each(Texture* fr in Items::animationLibrary.moAni->frames) {
2248 fr->box.w *= 1.0;
2249 fr->box.h *= 0.99;
2251 for each(Texture* fr in Items::animationLibrary.haAni->frames) {
2252 fr->box.w *= 1.070;
2253 fr->box.h *= 1.070;
2255 for each(Texture* fr in Items::animationLibrary.lPiAni->frames) {
2256 fr->box.w *= 1.070;
2257 fr->box.h *= 1.070;
2259 for each(Texture* fr in Items::animationLibrary.rPiAni->frames) {
2260 fr->box.w *= 1.0700;
2261 fr->box.h *= 1.0700;
2263 for each(Texture* fr in Items::animationLibrary.fiAni->frames) {
2264 fr->box.w *= 1.070;
2265 fr->box.h *= 1.070;
2268 screenRunning = true;
2269 lOpen = false;
2270 rOpen = false;
2272 moSel = true;
2273 piSel= false; fiSel= false;
2274 haSel= false; thSel= false; brSel= false;
2275 maSel= false; feSel= false; xxSel= false;
2276 blSel= false; tieSel= false; shirtSel= false;
2277 skSel= false; paSel= false; thiSel = false;
2278 moAni = false, lPinchAni = false, rPinchAni = false, fiAni = false,
2279 haAni = false, thAni = false, brAni = false, noBrAni = false,
2280 maAni = false, feAni = false, xxAni = false;
2283 blOn = true, tieOn = true, shirtOn = true,
2284 skOn = true, paOn = true, thiOn = true;
2287 if (Items::gameMode == 1) {//free
2288 moBuy = true, niBuy = true, fiBuy = true,
2289 haBuy = true, thBuy = true, brBuy = true,
2290 maBuy = true, feBuy = true, xxBuy = true,
2291 blBuy = true, tieBuy = true, shirtBuy = true,
2292 skBuy = true, paBuy = true, thiBuy = true;
2293 sleepModifier = 0;
2294 pointModifier = 0;
2295 expModifier = 0;
2297 else if (Items::gameMode == 2) {//reg
2298 moBuy = false, niBuy = false, fiBuy = false,
2299 haBuy = false, thBuy = false, brBuy = false,
2300 maBuy = false, feBuy = false, xxBuy = false,
2301 blBuy = false, tieBuy = false, shirtBuy = false,
2302 skBuy = false, paBuy = false, thiBuy = false;
2303 sleepModifier = 1.0;
2304 pointModifier = 1.0;
2305 expModifier = 1.0;
2307 else if (Items::gameMode == 3) {//time
2308 moBuy = true, niBuy = false, fiBuy = false,
2309 haBuy = false, thBuy = false, brBuy = false,
2310 maBuy = false, feBuy = false, xxBuy = false,
2311 blBuy = false, tieBuy = false, shirtBuy = false,
2312 skBuy = false, paBuy = false, thiBuy = false;
2313 sleepModifier = 1.0;
2314 pointModifier = 1.5;
2315 expModifier = 1.0;
2318 else if (Items::gameMode == 4) {//hard
2319 moBuy = false, niBuy = false, fiBuy = false,
2320 haBuy = false, thBuy = false, brBuy = false,
2321 maBuy = false, feBuy = false, xxBuy = false,
2322 blBuy = false, tieBuy = false, shirtBuy = false,
2323 skBuy = false, paBuy = false, thiBuy = false;
2324 sleepModifier = 1.0;
2325 pointModifier = 1.2;
2326 expModifier = 1.0;
2330 //blOn = true, tieOn = true, shirtOn = true,
2331 // skOn = true, paOn = true, thiOn = true;
2333 bool blFade = 255, tieFade = 255, shirtFade = 255,
2334 skFade = 255, paFade = 255, moisFade = 255, mFad = 0 ,tieTopFade = 0, thiFade = 255;
2335 semHaFade = 0, semMoFade = 0, semBrFade = 0, semStoFade = 0, semLegFade = 0;
2336 semHaActive = false, semMoActive = false, semBrActive = false, semStoActive = false, semLegActive = false;
2337 //bool moBuy = true, niBuy= true, fiBuy= true,
2338 // haBuy= true, thBuy= true, brBuy= true,
2339 // maBuy= true, feBuy= true, xxBuy= true,
2340 // blBuy = false, tieBuy = false, shirtBuy = false,
2341 // skBuy, paBuy, thiBuy;
2343 startTime = 0;
2344 initial = 0;
2345 expired = 0;
2347 start = false;
2348 ctrlClick = false;
2349 lightfx = false;
2351 BuyWords = new Words(44, 0, "Locked", SDL_Color{ 255,0,0,255 }, Items::r1, Items::w1);
2352 PriceWords = new Words(44, 0, "-1", SDL_Color{ 255,0,0,255 }, Items::r1, Items::w1);
2353 DemoWords = new Words(44, 0, "Demo", SDL_Color{ 255,0,0,255 }, Items::r1, Items::w1);
2355 wallX = Items::gameGraphics.TextWall->box.x;
2356 wallY = Items::gameGraphics.TextWall->box.y;
2357 wallW = Items::gameGraphics.TextWall->box.w;
2358 wallH = Items::gameGraphics.TextWall->box.h;
2359 bgX = Items::gameGraphics.TextBG->box.x;
2360 bgY = Items::gameGraphics.TextBG->box.y;
2361 bgW = Items::gameGraphics.TextBG->box.w;
2362 bgH = Items::gameGraphics.TextBG->box.h;
2364 gameLoop();
2367 double deadlineTime = 5 * 1000;
2368 int nonHoverAlphaL = 140;
2369 int nonHoverAlphaR = 65;
2370 void gameLoop() {
2372 screenRunning = true;
2373 initial = 0;
2374 expired = 0;
2376 startTime = SDL_GetTicks();
2378 #ifdef MAINGAMEOFF
2379 screenRunning = false;
2380 Items::screen = 01;awareCounter
2381 #endif
2383 unsigned seed = SDL_GetTicks();
2384 Items::generator.seed(seed);
2385 Items::generatorBinary.seed(seed);
2387 timerStart = SDL_GetTicks();
2389 while (screenRunning) {
2390 //float a = 0;
2391 //float b = 0;
2392 //std::cout << (a = SDL_GetTicks()) << "\n";
2394 systemTime = SYSTEM_MILLISECONDS;
2395 initial = systemTime.count();
2396 countdownTimer = SDL_GetTicks();
2398 processInput();
2399 update();
2400 play();
2401 render();
2402 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
2405 close();
2407 #ifdef MAINGAMEOFF
2408 Items::screen = 01;
2409 #endif
2412 SDL_Rect growRect;
2413 double masYStore, semYLocation;
2414 void processInput() {
2415 Items::inputs = Items::mio->processKBMInput(&x, &y);
2416 if (LCLICK) {
2417 //std::cout << x / (1076 * Graphics::scale) << "\n";
2418 //std::cout << y / (1100 * Graphics::scale) << "\n";
2419 //std::cout << "aaaa";
2421 /*if (Items::inputs->at(RIGHTMOUSECLICKED) && !Items::inputs->at(RIGHTMOUSEHELD))
2422 std::cout << "bbbb";*/
2423 //std::cout << Items::animationLibrary.lPiAni->frames.at(0)->box.x << " " << Items::animationLibrary.lPiAni->frames.at(0)->box.y << "\n";
2424 //Items::animationLibrary.thiAni->currentPosition = 0;
2425 if (Items::inputs->at(MOUSEWHEELDOWN)) {
2426 if (yClip < 6) {
2427 yClip += 1;
2428 Items::animationLibrary.moAni->setLocations(0.4317, 0.42075 - yClip * scrlPrcnt);
2429 Items::animationLibrary.haAni->setLocations(0.42207, 0.10805 - yClip * scrlPrcnt);
2430 Items::animationLibrary.lPiAni->setLocations(0.1244150, 0.565890 - yClip * scrlPrcnt);
2431 Items::animationLibrary.lPiAni->currentPosition = 22;
2432 Items::animationLibrary.rPiAni->setLocations(0.3511625, 0.6492 - yClip * scrlPrcnt);
2433 Items::animationLibrary.lPiAni->currentPosition = 14;
2434 Items::animationLibrary.fiAni->setLocations(0.055, 0.95 - yClip * scrlPrcnt);
2435 Items::animationLibrary.idleAni->setLocations(0.508 - 0.004808, 0.3095 - yClip * scrlPrcnt);
2437 Items::animationLibrary.eyesAni->setLocations(0.470, 0.290 - yClip * scrlPrcnt);
2438 Items::animationLibrary.felAni->setLocations(0.4745, 0.42305 - yClip * scrlPrcnt);
2439 masYStore -= scrlPrcnt;
2441 Items::animationLibrary.masAni->setLocations(0.0, masYStore);
2442 std::cout << masYStore << "\n";
2444 Items::animationLibrary.noBreAni->setLocations(0.25, 0.565 - yClip * scrlPrcnt);
2445 Items::animationLibrary.breAni->setLocations(0.27410, 0.45265 - yClip * scrlPrcnt);
2447 Items::animationLibrary.thiAni->setLocations(0.38, 1.18 - yClip * scrlPrcnt);
2449 Items::animationLibrary.pokeFake->updateAssignedLocations(0, -scrlPrcnt);
2450 Items::animationLibrary.handFake->updateAssignedLocations(0, -scrlPrcnt);
2452 haHitBox1.y = Graphics::prcnt(0.4575 - yClip * scrlPrcnt, 'y', Items::w1);
2453 haHitBox2.y = Graphics::prcnt(0.289 - yClip * scrlPrcnt, 'y', Items::w1);
2454 haHitBox3.y = Graphics::prcnt(0.12 - yClip * scrlPrcnt, 'y', Items::w1);
2455 haHitBox4.y = Graphics::prcnt(0.289 - yClip * scrlPrcnt, 'y', Items::w1);
2457 breastHitBox.y = Graphics::prcnt(0.63 - yClip * scrlPrcnt, 'y', Items::w1);
2459 thiHitBoxX = Graphics::prcnt(0.67, 'x', Items::w1);;
2460 thiHitBoxY = Graphics::prcnt(1.45 - yClip * scrlPrcnt, 'y', Items::w1);;
2462 lpHitBoxY = Graphics::prcnt(0.814 - yClip * scrlPrcnt, 'y', Items::w1);
2463 rpHitBoxY = Graphics::prcnt(0.852 - yClip * scrlPrcnt, 'y', Items::w1);
2464 fiHitBoxY = Graphics::prcnt(1.15 - yClip * scrlPrcnt, 'y', Items::w1);
2466 torso.y = Graphics::prcnt(0.67 - yClip * scrlPrcnt, 'y', Items::w1);
2467 head.y = Graphics::prcnt(0.12 - yClip * scrlPrcnt, 'y', Items::w1);
2468 pelvis.y = Graphics::prcnt(0.90 - yClip * scrlPrcnt, 'y', Items::w1);
2469 lArm.y = Graphics::prcnt(larmY - yClip * scrlPrcnt, 'y', Items::w1);
2470 rArm.y = Graphics::prcnt(rArmY - yClip * scrlPrcnt, 'y', Items::w1);
2471 lLeg.y = Graphics::prcnt(lLegY - yClip * scrlPrcnt, 'y', Items::w1);
2472 rLeg.y = Graphics::prcnt(rLegY - yClip * scrlPrcnt, 'y', Items::w1);
2473 Items::gameGraphics.semHair->renderTextureFadeIn(1000);
2475 Items::gameGraphics.semHair->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;
2476 Items::gameGraphics.semBre->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;
2477 Items::gameGraphics.semLeg->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;;
2478 Items::gameGraphics.semSto->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;;
2479 Items::gameGraphics.semMo->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;;
2482 if (Items::inputs->at(MOUSEWHEELUP)) {
2483 if (yClip > 0) {
2484 yClip -= 1;
2485 Items::animationLibrary.moAni->setLocations(0.4317, 0.42075 - yClip * scrlPrcnt);
2486 Items::animationLibrary.haAni->setLocations(0.42207, 0.10805 - yClip * scrlPrcnt);
2487 Items::animationLibrary.lPiAni->setLocations(0.1244150, 0.565890 - yClip * scrlPrcnt);
2488 Items::animationLibrary.lPiAni->currentPosition = 22;
2489 Items::animationLibrary.rPiAni->setLocations(0.3511625, 0.6492 - yClip * scrlPrcnt);
2490 Items::animationLibrary.lPiAni->currentPosition = 14;
2491 Items::animationLibrary.fiAni->setLocations(0.055, 0.95 - yClip * scrlPrcnt);
2492 Items::animationLibrary.idleAni->setLocations(0.508 - 0.004808, 0.3095 - yClip * scrlPrcnt);
2494 Items::animationLibrary.eyesAni->setLocations(0.470, 0.290 - yClip * scrlPrcnt);
2496 masYStore += scrlPrcnt;
2497 Items::animationLibrary.felAni->setLocations(0.4745, 0.42305 - yClip * scrlPrcnt);
2498 Items::animationLibrary.masAni->setLocations(0.0, masYStore);
2499 std::cout << masYStore<< "\n";
2501 Items::animationLibrary.noBreAni->setLocations(0.25, 0.565 - yClip * scrlPrcnt);
2502 Items::animationLibrary.breAni->setLocations(0.27410, 0.45265 - yClip * scrlPrcnt);
2504 Items::animationLibrary.thiAni->setLocations(0.38, 1.18 - yClip * scrlPrcnt);
2506 Items::animationLibrary.pokeFake->updateAssignedLocations(0, scrlPrcnt);
2507 Items::animationLibrary.handFake->updateAssignedLocations(0, scrlPrcnt);
2509 haHitBox1.y = Graphics::prcnt(0.4575 - yClip * scrlPrcnt, 'y', Items::w1) ;
2510 haHitBox2.y = Graphics::prcnt(0.289 - yClip * scrlPrcnt, 'y', Items::w1);
2511 haHitBox3.y = Graphics::prcnt(0.12 - yClip * scrlPrcnt, 'y', Items::w1);
2512 haHitBox4.y = Graphics::prcnt(0.289 - yClip * scrlPrcnt, 'y', Items::w1);
2514 breastHitBox.y = Graphics::prcnt(0.63 - yClip * scrlPrcnt, 'y', Items::w1);
2516 thiHitBoxY = Graphics::prcnt(1.45 - yClip * scrlPrcnt, 'y', Items::w1);;
2517 lpHitBoxY = Graphics::prcnt(0.814 - yClip * scrlPrcnt, 'y', Items::w1);
2518 rpHitBoxY = Graphics::prcnt(0.852 - yClip * scrlPrcnt, 'y', Items::w1);
2519 fiHitBoxY = Graphics::prcnt(1.15 - yClip * scrlPrcnt, 'y', Items::w1);
2521 torso.y = Graphics::prcnt(0.67 - yClip * scrlPrcnt, 'y', Items::w1);
2522 head.y = Graphics::prcnt(0.12 - yClip * scrlPrcnt, 'y', Items::w1);
2523 pelvis.y = Graphics::prcnt(0.90 - yClip * scrlPrcnt, 'y', Items::w1);
2524 lArm.y = Graphics::prcnt(larmY - yClip * scrlPrcnt, 'y', Items::w1);
2525 rArm.y = Graphics::prcnt(rArmY - yClip * scrlPrcnt, 'y', Items::w1);
2526 lLeg.y = Graphics::prcnt(lLegY - yClip * scrlPrcnt, 'y', Items::w1);
2527 rLeg.y = Graphics::prcnt(rLegY - yClip * scrlPrcnt, 'y', Items::w1);
2529 Items::gameGraphics.semHair->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;
2530 Items::gameGraphics.semBre->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;
2531 Items::gameGraphics.semLeg->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;;
2532 Items::gameGraphics.semSto->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;;
2533 Items::gameGraphics.semMo->box.y = Graphics::prcnt(0 - yClip * scrlPrcnt, 'y', Items::w1);;;
2535 //std::cout << "ddddd"; std::cout << yClip;
2538 if (true) {
2539 if (Items::inputs->at(NUM1) && !Items::inputs->at(NUM1_H)) {
2540 *curSel = false;
2541 curSel = &moSel;
2542 moSel = true;
2543 feSel = false;
2545 else if (Items::inputs->at(NUM2) && !Items::inputs->at(NUM2_H)) {
2546 if (niBuy) {
2547 *curSel = false;
2548 curSel = &piSel;
2549 piSel = true;
2550 brSel = false;
2551 brAni = false;
2552 noBrAni = false;
2556 if (Items::inputs->at(NUM3) && !Items::inputs->at(NUM3_H)) {
2557 if (fiBuy) {
2558 *curSel = false;
2559 curSel = &fiSel;
2560 fiSel = true;
2563 else if (Items::inputs->at(NUM4) && !Items::inputs->at(NUM4_H)) {
2564 if (haBuy) {
2565 *curSel = false;
2566 curSel = &haSel;
2567 haSel = true;
2570 else if (Items::inputs->at(NUM5) && !Items::inputs->at(NUM5_H)) {
2571 if (thBuy) {
2572 *curSel = false;
2573 curSel = &thSel;
2574 thSel = true;
2577 else if (Items::inputs->at(NUM6) && !Items::inputs->at(NUM6_H)) {
2578 if (brBuy) {
2579 *curSel = false;
2580 curSel = &brSel;
2581 brSel = true;
2582 piSel = false;
2583 lPinchAni = false;
2584 rPinchAni = false;
2587 else if (Items::inputs->at(NUM7) && !Items::inputs->at(NUM7_H)) {
2588 if (maBuy) {
2589 *curSel = false;
2590 curSel = &maSel;
2591 maSel = true;
2595 else if (Items::inputs->at(NUM8) && !Items::inputs->at(NUM8_H)) {
2596 if (feBuy) {
2597 *curSel = false;
2598 curSel = &feSel;
2599 feSel = true;
2600 moSel = false;
2603 //else if (Items::inputs->at(NUM9) && !Items::inputs->at(NUM9_H)) {
2604 // if (xxBuy) {
2605 // *curSel = false;
2606 // curSel = &xxSel;
2607 // xxSel = true;
2608 // }
2610 else if (Items::inputs->at(KEYQ) && !Items::inputs->at(KEYQ_H)) {
2611 if (blBuy) {
2612 if (blOn) {
2613 blOn = false;
2614 blSel = true;
2615 lPinchAni = false;
2616 rPinchAni = false;
2617 noBrAni = false;
2618 brAni = false;
2620 else {
2621 lPinchAni = false;
2622 rPinchAni = false;
2623 blOn = true;
2624 blSel = false;
2625 noBrAni = false;
2626 brAni = false;
2630 if (Items::inputs->at(KEYW) && !Items::inputs->at(KEYW_H)) {
2631 if (tieBuy) {
2632 if (tieOn) {
2633 tieOn = false;
2634 tieSel = true;
2636 else {
2637 tieOn = true;
2638 tieSel = false;
2642 else if (Items::inputs->at(KEYE) && !Items::inputs->at(KEYE_H)) {
2643 if (shirtBuy) {
2644 if (shirtOn) {
2645 shirtOn = false;
2646 shirtSel = true;
2647 lPinchAni = false;
2648 rPinchAni = false;
2649 noBrAni = false;
2650 brAni = false;
2653 else {
2654 shirtOn = true;
2655 shirtSel = false;
2656 lPinchAni = false;
2657 rPinchAni = false;
2658 noBrAni = false;
2659 brAni = false;
2663 else if (Items::inputs->at(KEYR) && !Items::inputs->at(KEYR_H)) {
2664 if (skBuy) {
2665 if (skOn) {
2666 skOn = false;
2667 skSel = true;
2669 else {
2670 fiAni = false;
2671 skOn = true;
2672 skSel = false;
2676 else if (Items::inputs->at(KEYT) && !Items::inputs->at(KEYT_H)) {
2677 if (paBuy) {
2678 if (paOn) {
2679 paOn = false;
2680 paSel = true;
2682 else {
2683 paOn = true;
2684 paSel = false;
2688 else if (Items::inputs->at(KEYY) && !Items::inputs->at(KEYY_H)) {
2689 if (thiBuy) {
2690 if (thiOn) {
2691 thiSel = true;
2692 thiOn = false;
2694 else {
2695 thiSel = false;
2696 thiOn = true;
2702 bool hoverMo, hoverHa, hoverFi, hoverLPinch, hoverRPinch, hoverBre, hoverThi;
2703 bool moveMo, moveHa, moveFi, moveLPi, moveRPi;
2704 bool openEyes, stopMouth;
2705 float aRadius = 0.10, neutralRadius = 0.1, bRadius = 0.05, cRadius = 0.20;
2706 float j;
2707 int graphicPosition = -1;
2708 SDL_Rect leftBox;
2709 void update() {
2710 screenRunning = !Items::inputs->at(QUIT);
2712 leftBox = { Graphics::prcnt(0.23, 'x', Items::w1), Graphics::prcnt(0.55, 'y', Items::w1), Items::gameGraphics.RArrow->box.w, Items::gameGraphics.RArrow->box.h };
2713 Items::gameGraphics.RArrow->box.y = Graphics::prcnt(0.3, 'y', Items::w1);
2714 hover = false;
2715 hoverLeft = false;
2716 hoverRight = false;
2717 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.UDArrowL->box, x, y)) {
2718 hoverLeft = true;
2719 hoverUDL = true;
2721 playGenericHover = true;
2722 if (LCLICK) {
2723 lOpen = !lOpen;
2724 playGenericClick = true;
2725 //std::cout << "111";
2728 else
2729 hoverUDL = false;
2730 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.UDArrowR->box, x, y)) {
2731 hoverNotThatOne = true;
2732 hoverRight = true;
2733 if (LCLICK) {
2734 rOpen = !rOpen;
2735 playGenericClick = true;
2736 // std::cout << "222";
2738 hoverUDR = true;
2740 else
2741 hoverUDR = false;
2742 if (Items::inputs->at(CTRL) && !Items::inputs->at(CTRLHELD)) {
2743 GenericGameTools::reset();
2744 if (start)
2745 if (!ctrlClick ) ctrlClick = true;
2746 else ctrlClick = false;
2749 if (lOpen) {
2750 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxMainBGL->box, x, y)) {
2751 int transpa = 255;
2752 int offTraspa = 0;
2753 if (tab == 1) {
2754 Tab1Words->setTransparency(transpa);
2755 Items::gameGraphics.BoxBGSel1->setTransparency(transpa + offTraspa);
2756 Items::gameGraphics.TextNipples->setTransparency(transpa + offTraspa);
2757 Items::gameGraphics.TextMouth->setTransparency(transpa + offTraspa);
2758 Items::gameGraphics.TextVagina->setTransparency(transpa + offTraspa);
2760 else if (tab == 2) {
2761 Tab2Words->setTransparency(transpa);
2762 Items::gameGraphics.BoxBGSel2->setTransparency(transpa + offTraspa);
2763 Items::gameGraphics.TextBreast->setTransparency(transpa + offTraspa);
2764 Items::gameGraphics.TextThigh->setTransparency(transpa + offTraspa);
2765 Items::gameGraphics.TextHair->setTransparency(transpa + offTraspa);
2767 else if (tab == 3) {
2768 Tab3Words->setTransparency(transpa);
2769 Items::gameGraphics.BoxBGSel3->setTransparency(transpa + offTraspa);
2770 Items::gameGraphics.TextFellatio->setTransparency(transpa + offTraspa);
2771 Items::gameGraphics.TextMasturbation->setTransparency(transpa + offTraspa);
2772 Items::gameGraphics.TextXXX->setTransparency(transpa + offTraspa);
2774 else if (tab == 4) {
2775 Tab4Words->setTransparency(transpa);
2776 Items::gameGraphics.BoxBGSel4->setTransparency(transpa);
2777 Items::gameGraphics.TextBlazer->setTransparency(transpa + offTraspa);
2778 Items::gameGraphics.TextShirt->setTransparency(transpa + offTraspa);
2779 Items::gameGraphics.TextTie->setTransparency(transpa + offTraspa);
2781 else if (tab == 5) {
2782 Tab5Words->setTransparency(transpa);
2783 Items::gameGraphics.BoxBGSel5->setTransparency(transpa + offTraspa);
2784 Items::gameGraphics.TextPanties->setTransparency(transpa + offTraspa);
2785 Items::gameGraphics.TextThighHigh->setTransparency(transpa + offTraspa);
2786 Items::gameGraphics.TextSkirt->setTransparency(transpa + offTraspa);
2789 DemoWords->setTransparency(transpa);
2790 BuyWords->setTransparency(transpa);
2791 Items::gameGraphics.BoxMainBGL->setTransparency(transpa);
2792 Items::gameGraphics.selHighlight->setTransparency(transpa);
2793 Items::gameGraphics.selTabs->setTransparency(transpa);
2794 Items::gameGraphics.UDArrowL->setTransparency(transpa);
2795 Items::gameGraphics.RArrow->setTransparency(transpa);
2796 Items::gameGraphics.ToolsLogo->setTransparency(transpa);
2798 else {
2799 int transpa = nonHoverAlphaR - 0;
2800 int offTraspa = 20;
2801 hover = true;
2802 if (tab == 1) {
2803 Tab1Words->setTransparency(transpa);
2804 Items::gameGraphics.BoxBGSel1->setTransparency(transpa + offTraspa);
2805 Items::gameGraphics.TextNipples->setTransparency(transpa + offTraspa);
2806 Items::gameGraphics.TextMouth->setTransparency(transpa + offTraspa);
2807 Items::gameGraphics.TextVagina->setTransparency(transpa + offTraspa);
2809 else if (tab == 2) {
2810 Tab2Words->setTransparency(transpa);
2811 Items::gameGraphics.BoxBGSel2->setTransparency(transpa + offTraspa);
2812 Items::gameGraphics.TextBreast->setTransparency(transpa + offTraspa);
2813 Items::gameGraphics.TextThigh->setTransparency(transpa + offTraspa);
2814 Items::gameGraphics.TextHair->setTransparency(transpa + offTraspa);
2816 else if (tab == 3) {
2817 Tab3Words->setTransparency(transpa);
2818 Items::gameGraphics.BoxBGSel3->setTransparency(transpa + offTraspa);
2819 Items::gameGraphics.TextFellatio->setTransparency(transpa + offTraspa);
2820 Items::gameGraphics.TextMasturbation->setTransparency(transpa + offTraspa);
2821 Items::gameGraphics.TextXXX->setTransparency(transpa + offTraspa);
2823 else if (tab == 4) {
2824 Tab4Words->setTransparency(transpa);
2825 Items::gameGraphics.BoxBGSel4->setTransparency(transpa);
2826 Items::gameGraphics.TextBlazer->setTransparency(transpa + offTraspa);
2827 Items::gameGraphics.TextShirt->setTransparency(transpa + offTraspa);
2828 Items::gameGraphics.TextTie->setTransparency(transpa + offTraspa);
2830 else if (tab == 5) {
2831 Tab5Words->setTransparency(transpa);
2832 Items::gameGraphics.BoxBGSel5->setTransparency(transpa + offTraspa);
2833 Items::gameGraphics.TextPanties->setTransparency(transpa + offTraspa);
2834 Items::gameGraphics.TextThighHigh->setTransparency(transpa + offTraspa);
2835 Items::gameGraphics.TextSkirt->setTransparency(transpa + offTraspa);
2838 DemoWords->setTransparency(transpa);
2839 BuyWords->setTransparency(transpa);
2840 Items::gameGraphics.BoxMainBGL->setTransparency(transpa);
2841 Items::gameGraphics.selHighlight->setTransparency(transpa);
2842 Items::gameGraphics.selTabs->setTransparency(transpa);
2843 Items::gameGraphics.UDArrowL->setTransparency(transpa);
2844 Items::gameGraphics.RArrow->setTransparency(transpa);
2845 Items::gameGraphics.ToolsLogo->setTransparency(transpa);
2847 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.RArrow->box, x, y)) {
2848 hoverNotThatOne = true;
2849 hoverR = true;
2850 playGenericHover = true;
2851 if (hoverR && LCLICK) {
2852 // std::cout << "333";
2853 playGenericClick = true;
2854 tab++;
2855 if (tab > 5) {
2856 tab = 1;
2860 else
2861 hoverR = false;
2862 if (GenericGameTools::checkRectHitBox(leftBox, x, y)) {
2863 hoverNotThatOne = true;
2864 hoverL = true;
2865 playGenericHover = true;
2866 if (hoverL && LCLICK) {
2867 // std::cout << "333";
2868 playGenericClick = true;
2869 tab--;
2870 if (tab < 1) {
2871 tab = 5;
2875 else
2876 hoverL = false;
2877 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxBGSel1->box, x, y)) {
2878 hoverNotThatOne = true;
2879 hoverSel1 = true;
2880 playGenericHover = true;
2881 if (LCLICK) {
2882 // std::cout << "444";
2884 if (tab == 1) {
2885 if (moBuy) {
2886 *curSel = false;
2887 curSel = &moSel;
2888 moSel = true;
2889 feSel = false;
2891 else {
2892 if (expPoints >= moPrice) {
2893 moBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(20), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2894 new Words(promptYesNoSize ,0,Text::PromptText.at(2),SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
2895 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2896 new Words(promptMsgSize,0, "Required: Nothing", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
2897 if (moBuy) {
2898 expPoints -= moPrice;
2900 else errorSound = true;
2902 else {
2903 errorSound = true;
2907 #ifndef BETA
2908 else if (tab == 2) {
2909 if (haBuy) {
2910 *curSel = false;
2911 curSel = &haSel;
2912 haSel = true;
2914 else {
2915 if (expPoints >= haPrice) {
2916 haBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(6), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2917 new Words(promptYesNoSize ,0,Text::PromptText.at(2),SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
2918 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2919 new Words(promptMsgSize,0, "Required: Nothing", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
2920 if (haBuy) {
2921 expPoints -= haPrice;
2923 else errorSound = true;
2925 else {
2926 errorSound = true;
2931 #endif
2932 else if (tab == 3) {
2933 if (maBuy) {
2934 *curSel = false;
2935 curSel = &maSel;
2936 maSel = true;
2938 else {
2939 if (expPoints >= maPrice) {
2940 maBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(7), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2941 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
2942 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2943 new Words(promptMsgSize,0, "Required: Nothing", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
2944 if (maBuy) {
2945 expPoints -= maPrice;
2947 else errorSound = true;
2949 else {
2950 errorSound = true;
2956 else if (tab == 4) {
2957 if (blBuy) {
2958 if (blOn) {
2959 blOn = false;
2960 blSel = true;
2961 noBrAni = false;
2962 brAni = false;
2963 lPinchAni = false;
2964 rPinchAni = false;
2966 else {
2967 noBrAni = false;
2968 brAni = false;
2969 lPinchAni = false;
2970 rPinchAni = false;
2971 blOn = true;
2972 blSel = false;
2975 else {
2976 if (expPoints >= blPrice) {
2977 blBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(8), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
2978 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
2979 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
2981 if (blBuy) {
2982 expPoints -= blPrice;
2983 }else errorSound = true;
2985 else {
2986 errorSound = true;
2990 #ifndef BETA
2991 else if (tab == 5) {
2992 if (skBuy) {
2993 if (skOn) {
2994 skOn = false;
2995 skSel = true;
2997 else {
2998 skOn = true;
2999 skSel = false;
3002 else {
3003 if (expPoints >= skPrice) {
3004 skBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(9), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3005 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3006 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3007 if (skBuy) {
3008 expPoints -= skPrice;
3010 else errorSound = true;
3012 else {
3013 errorSound = true;
3018 #endif
3021 else
3022 hoverSel1 = false;
3023 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxBGSel2->box, x, y)) {
3024 hoverSel2 = true;
3025 hoverNotThatOne = true;
3026 playGenericHover = true;
3027 if (LCLICK) {
3028 // std::cout << "555";
3029 #ifndef BETA
3030 if (tab == 1) {
3031 if (niBuy) {
3032 *curSel = false;
3033 curSel = &piSel;
3034 piSel = true;
3035 brSel = false;
3036 brAni = false;
3037 noBrAni = false;
3039 else {
3040 if (expPoints >= niPrice) {
3041 niBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(10), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3042 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3043 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3044 new Words(promptMsgSize,0, "Required: Topless", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3045 if (niBuy) {
3046 expPoints -= niPrice;
3048 else errorSound = true;
3050 else {
3051 errorSound = true;
3055 else
3056 #endif
3057 if (tab == 2) {
3058 if (thBuy) {
3059 *curSel = false;
3060 curSel = &thSel;
3061 thSel = true;
3063 else {
3064 if (expPoints >= thPrice) {
3065 thBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(11), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3066 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3067 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3068 new Words(promptMsgSize,0, "Required: Nothing", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3069 if (thBuy) {
3070 expPoints -= thPrice;
3072 else errorSound = true;
3074 else {
3075 errorSound = true;
3079 #ifndef BETA
3080 else if (tab == 3) {
3081 if (feBuy) {
3082 *curSel = false;
3083 curSel = &feSel;
3084 feSel = true;
3085 moSel = false;
3087 else {
3088 if (expPoints >= fePrice) {
3089 feBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(12), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3090 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3091 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3092 new Words(promptMsgSize,0, "Required: Nothing", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3093 if (feBuy) {
3094 expPoints -= fePrice;
3096 else errorSound = true;
3098 else {
3099 errorSound = true;
3104 else
3105 #endif
3106 if (tab == 4) {
3107 if (tieBuy) {
3108 if (tieOn) {
3109 tieOn = false;
3110 tieSel = true;
3112 else {
3113 tieOn = true;
3114 tieSel = false;
3117 else {
3118 if (expPoints >= tiePrice) {
3119 tieBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(13), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3120 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3121 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3122 if (tieBuy) {
3123 expPoints -= tiePrice;
3124 } else errorSound = true;
3126 else {
3127 errorSound = true;
3131 #ifndef BETA
3132 else if (tab == 5) {
3133 if (paBuy) {
3134 if (paOn) {
3135 paOn = false;
3136 paSel = true;
3138 else {
3139 paOn = true;
3140 paSel = false;
3143 else {
3144 if (expPoints >= paPrice) {
3145 paBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(14), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3146 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3147 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3148 if (paBuy) {
3149 expPoints -= paPrice;
3151 else errorSound = true;
3153 else {
3154 errorSound = true;
3159 #endif
3162 else
3163 hoverSel2 = false;
3165 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxBGSel3->box, x, y)) {
3166 hoverSel3 = true;
3167 hoverNotThatOne = true;
3168 playGenericHover = true;
3169 if (LCLICK) {
3170 // std::cout << "666";
3171 #ifndef BETA
3172 if (tab == 1) {
3173 if (fiBuy) {
3174 *curSel = false;
3175 curSel = &fiSel;
3176 fiSel = true;
3178 else {
3179 if (expPoints >= fiPrice) {
3180 fiBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(15), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3181 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3182 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3183 new Words(promptMsgSize,0, "Required: Bottomless", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3184 if (fiBuy) {
3185 expPoints -= fiPrice;
3187 else errorSound = true;
3189 else {
3190 errorSound = true;
3194 else
3195 #endif
3196 if (tab == 2) {
3197 if (brBuy) {
3198 *curSel = false;
3199 curSel = &brSel;
3200 brSel = true;
3201 piSel = false;
3202 lPinchAni = false;
3203 rPinchAni = false;
3205 else {
3206 if (expPoints >= brPrice) {
3207 brBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(16), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3208 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3209 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3210 new Words(promptMsgSize-9,0, "Required: Topless/Shirt Only", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3211 if (brBuy) {
3212 expPoints -= brPrice;
3214 else errorSound = true;
3216 else {
3217 errorSound = true;
3221 else if (tab == 3) {
3222 if (xxBuy) {
3223 *curSel = false;
3224 curSel = &xxSel;
3225 xxSel = true;
3226 Items::gameState = -1;
3227 screenRunning = false;
3229 else {
3230 if (expPoints >= xxPrice) {
3231 xxBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(17), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3232 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3233 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3234 new Words(promptMsgSize,0, "Required: Fully Nude", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3235 if (xxBuy) {
3236 expPoints -= xxPrice;
3238 else errorSound = true;
3240 else {
3241 errorSound = true;
3248 #ifndef BETA
3249 else if (tab == 4) {
3250 if (shirtBuy) {
3251 if (shirtOn) {
3252 shirtOn = false;
3253 shirtSel = true;
3254 noBrAni = false;
3255 brAni = false;
3256 lPinchAni = false;
3257 rPinchAni = false;
3260 else {
3261 lPinchAni = false;
3262 rPinchAni = false;
3263 noBrAni = false;
3264 brAni = false;
3265 shirtOn = true;
3266 shirtSel = false;
3269 else {
3270 if (expPoints >= shirtPrice) {
3271 shirtBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(18), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3272 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3273 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3274 if (shirtBuy) {
3275 expPoints -= shirtPrice;
3276 } else errorSound = true;
3278 else {
3279 errorSound = true;
3283 #endif
3284 #ifndef BETA
3285 else if (tab == 5) {
3286 if (thiBuy) {
3287 if (thiOn){
3288 thiSel = true;
3289 thiOn = false;
3291 else {
3292 thiSel = false;
3293 thiOn = true;
3296 else {
3297 if (expPoints >= thiPrice) {
3298 thiBuy = Prompts::runPrompt({ new Words(promptMsgSize ,0,Text::PromptText.at(19), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
3299 new Words(promptYesNoSize ,0,Text::PromptText.at(2), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) ,
3300 new Words(promptYesNoSize ,0,Text::PromptText.at(3), SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) });
3301 if (thiBuy) {
3302 expPoints -= thiPrice;
3304 else errorSound = true;
3306 else {
3307 errorSound = true;
3313 #endif
3317 else
3318 hoverSel3 = false;
3321 if (rOpen) {
3322 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxMainBGR->box, x, y)) {
3323 int transpa = 255;
3325 pointsString = GenericGameTools::createPointString(expPoints, 4);
3326 PointsWords->changeText(pointsString);
3328 Items::gameGraphics.BoxFullIncence->setTransparency(transpa);
3329 Items::gameGraphics.BoxFullChloro->setTransparency(transpa);
3330 Items::gameGraphics.BoxBGV->setTransparency(transpa);
3331 Items::gameGraphics.BoxBGH->setTransparency(transpa);
3332 Items::gameGraphics.BoxOLV->setTransparency(transpa);
3333 Items::gameGraphics.BoxOLH->setTransparency(transpa);
3334 ExperienceWords->setTransparency(transpa);
3335 PointsWords->setTransparency(transpa);
3336 Incenence->setTransparency(transpa);
3337 ChloroformWords->setTransparency(transpa);
3338 AwarenessWords->setTransparency(transpa);
3339 ChloroformTipWords->setTransparency(transpa);
3340 IncenceTipWords->setTransparency(transpa);
3341 Items::gameGraphics.StatsLogo->setTransparency(transpa);
3342 Items::gameGraphics.UDArrowR->setTransparency(transpa);
3343 Items::gameGraphics.BoxMainBGR->setTransparency(transpa);
3345 else {
3346 int transpa = nonHoverAlphaR - 20;
3348 pointsString = GenericGameTools::createPointString(expPoints, 4);
3349 PointsWords->changeText(pointsString);
3351 Items::gameGraphics.BoxFullIncence->setTransparency(transpa);
3352 Items::gameGraphics.BoxFullChloro->setTransparency(transpa);
3353 Items::gameGraphics.BoxBGV->setTransparency(transpa);
3354 Items::gameGraphics.BoxBGH->setTransparency(transpa);
3355 Items::gameGraphics.BoxOLV->setTransparency(transpa);
3356 Items::gameGraphics.BoxOLH->setTransparency(transpa);
3357 ExperienceWords->setTransparency(transpa);
3358 PointsWords->setTransparency(transpa);
3359 Incenence->setTransparency(transpa);
3360 ChloroformWords->setTransparency(transpa);
3361 AwarenessWords->setTransparency(transpa);
3362 ChloroformTipWords->setTransparency(transpa);
3363 IncenceTipWords->setTransparency(transpa);
3364 Items::gameGraphics.StatsLogo->setTransparency(transpa);
3365 Items::gameGraphics.UDArrowR->setTransparency(transpa);
3366 Items::gameGraphics.BoxMainBGR->setTransparency(transpa);
3369 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxFullChloro->box, x, y)) {
3370 hoverCHCl3 = true;
3371 hoverNotThatOne = true;
3372 playGenericHover = true;
3373 if (LCLICK) {
3374 //std::cout << "888";
3375 playGenericClick = true;
3376 if (sleepModifier > 0.0 && expPoints >= 100) {
3377 sleepModifier *= 0.80;
3378 sleepDecMod *= 1.06;
3379 awareCounter -= 2500 * 1;
3380 if (awareCounter < 0) awareCounter = 0;
3381 expPoints -= 100;
3382 chloroClick = true;
3384 else errorSound = true;
3387 else
3388 hoverCHCl3 = false;
3389 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxFullIncence->box, x, y)) {
3390 hoverInce = true;
3391 hoverNotThatOne = true;
3392 playGenericHover = true;
3393 if (LCLICK) {
3394 //std::cout << "888";
3395 playGenericClick = true;
3396 if (expPoints >= 150) {
3397 pointModifier *= 1.10;
3398 expPoints -= 150;
3399 inceClick = true;
3401 else errorSound = true;
3404 else
3405 hoverInce = false;
3408 hoverMo = false;
3409 hoverHa = false;
3410 hoverFi = false;
3411 hoverLPinch = false;
3412 hoverRPinch = false;
3413 hoverThi = false;
3414 hoverBre = false;
3415 bool poke = true;
3417 /*std::cout << GenericGameTools::checkRectHitBox(haHitBox1, x, y) << " " <<
3418 GenericGameTools::checkRectHitBox(haHitBox2, x, y) << " " <<
3419 GenericGameTools::checkRectHitBox(haHitBox3, x, y) << " " <<
3420 GenericGameTools::checkRectHitBox(haHitBox4, x, y) << "\n";*/
3422 /////////////////MOUTH
3423 if (moveMo) hoverMo = true;
3424 else if (moveHa) hoverHa = true;
3425 else if (moveFi) hoverFi = true;
3426 else if (moveLPi) lPinchAni = true;
3427 else if (moveRPi) rPinchAni = true;
3428 else if (moAni && (GenericGameTools::checkRectHitBox(Items::animationLibrary.moAni->frames.at(Items::animationLibrary.moAni->currentPosition)->box, x, y))) {
3429 hoverMo = true;
3430 poke = false;
3432 else if (!moAni && GenericGameTools::checkCircleHitBox(moHitBoxX, moHitBoxY - yClip * scrollRate, Graphics::prcnt(aRadius, 'x', Items::w1), x, y)) {
3433 hoverMo = true;
3434 poke = false;
3435 Items::animationLibrary.moAni->currentPosition = 0;
3437 ///////////////////HAIR
3438 else if (haAni && (GenericGameTools::checkRectHitBox(Items::animationLibrary.haAni->frames.at(Items::animationLibrary.haAni->currentPosition)->box, x, y))
3439 || (GenericGameTools::checkRectHitBox(haHitBox1, x, y) ||
3440 GenericGameTools::checkRectHitBox(haHitBox2, x, y) ||
3441 GenericGameTools::checkRectHitBox(haHitBox3, x, y) ||
3442 GenericGameTools::checkRectHitBox(haHitBox4, x, y))) {
3443 hoverHa = true;
3444 poke = false;
3446 else if (!haAni &&
3447 (GenericGameTools::checkRectHitBox(haHitBox1, x, y) ||
3448 GenericGameTools::checkRectHitBox(haHitBox2, x, y) ||
3449 GenericGameTools::checkRectHitBox(haHitBox3, x, y) ||
3450 GenericGameTools::checkRectHitBox(haHitBox4, x, y))) {
3451 hoverHa = true;
3452 poke = false;
3453 Items::animationLibrary.haAni->currentPosition = 0;
3455 ///////////////////FING
3456 else if (fiAni && !skOn && (GenericGameTools::checkRectHitBox(Items::animationLibrary.fiAni->frames.at(Items::animationLibrary.fiAni->currentPosition)->box, x, y)
3457 )) {
3458 poke = false;
3459 hoverFi = true;
3461 else if (!fiAni && !skOn && (GenericGameTools::checkCircleHitBox(fiHitBoxX, fiHitBoxY - yClip * scrollRate, Graphics::prcnt(aRadius, 'x', Items::w1), x, y))) {
3462 hoverFi = true;
3463 poke = false;
3465 ///////////////////LPINCH
3466 else if (lPinchAni && (GenericGameTools::checkRectHitBox(Items::animationLibrary.lPiAni->frames.at(Items::animationLibrary.lPiAni->currentPosition)->box, x, y)
3467 && !shirtOn && !blOn && !tieOn)) {
3468 poke = false;
3469 hoverLPinch = true;
3471 else if (!lPinchAni&& (GenericGameTools::checkCircleHitBox(lpHitBoxX, lpHitBoxY - yClip * scrollRate, Graphics::prcnt(aRadius, 'x', Items::w1), x, y)
3472 && !shirtOn && !blOn&& piSel && !tieOn)) {
3473 poke = false;
3474 hoverLPinch = true;
3475 Items::animationLibrary.lPiAni->currentPosition = 14;
3477 ///////////////////RPINCH
3478 else if (rPinchAni && (GenericGameTools::checkRectHitBox(Items::animationLibrary.rPiAni->frames.at(Items::animationLibrary.rPiAni->currentPosition)->box, x, y)
3479 && !shirtOn && !blOn && !tieOn)) {
3480 poke = false;
3481 hoverRPinch = true;
3483 else if (!rPinchAni && GenericGameTools::checkCircleHitBox(rpHitBoxX, rpHitBoxY - yClip * scrollRate, Graphics::prcnt(aRadius, 'x', Items::w1), x, y)
3484 && !shirtOn && !blOn&& piSel && !tieOn) {
3485 poke = false;
3486 hoverRPinch = true;
3487 Items::animationLibrary.rPiAni->currentPosition = 22;
3489 ////////////////MASAGE
3490 else if (noBrAni && shirtOn && !tieOn && !blOn && GenericGameTools::checkRectHitBox(breastHitBox, x, y)) {
3491 //std::cout << "A\n";
3492 hoverBre = true;
3493 poke = false;
3495 else if (brAni && !shirtOn && !tieOn && !blOn && GenericGameTools::checkRectHitBox(breastHitBox, x, y)) {
3496 //std::cout << "B\n";
3497 hoverBre = true;
3498 poke = false;
3500 else if (!noBrAni && shirtOn && !tieOn && !blOn && GenericGameTools::checkRectHitBox(breastHitBox, x, y)) {
3501 //std::cout << "C\n";
3502 hoverBre = true;
3503 Items::animationLibrary.noBreAni->currentPosition = 0;
3504 poke = false;
3506 else if (!brAni && !shirtOn && !tieOn && !blOn && GenericGameTools::checkRectHitBox(breastHitBox, x, y)) {
3507 //std::cout << "D\n";
3508 hoverBre = true;
3509 Items::animationLibrary.breAni->currentPosition = 0;
3510 poke = false;
3512 //THIGH
3513 else if (thAni && (GenericGameTools::checkRectHitBox(Items::animationLibrary.thiAni->frames.at(Items::animationLibrary.thiAni->currentPosition)->box, x, y))) {
3514 hoverThi = true;
3515 poke = false;
3516 //std::cout << "E\n";
3518 else if (!thAni && (GenericGameTools::checkCircleHitBox(thiHitBoxX, thiHitBoxY - yClip * scrollRate, Graphics::prcnt(cRadius, 'x', Items::w1), x, y))) {
3519 hoverThi = true;
3520 poke = false;
3521 //std::cout << "F\n";
3523 if (hoverUDR || hoverUDL || hoverR || hoverL || hoverCHCl3 || hoverInce || hoverSel1 || hoverSel2 || hoverSel3) {}
3524 else if (LCLICK) {
3525 bool del = false;
3526 graphicPosition = Items::animationLibrary.pokeFake->searchFramesByCoordinates(x, y);
3527 int graphicPosition2 = Items::animationLibrary.handFake->searchFramesByCoordinates(x, y);
3528 if (graphicPosition >= 0) {
3529 Items::animationLibrary.pokeFake->assignedFrameCopies.erase(Items::animationLibrary.pokeFake->assignedFrameCopies.begin() + graphicPosition);
3530 del = true;
3532 else if (graphicPosition2 >= 0) {
3533 Items::animationLibrary.handFake->assignedFrameCopies.erase(Items::animationLibrary.handFake->assignedFrameCopies.begin() + graphicPosition2);
3534 del = true;
3536 else if (maAni && GenericGameTools::checkRectHitBox(Items::animationLibrary.masAni->frames.at(Items::animationLibrary.masAni->currentPosition)->box, x, y)) {
3537 maAni = false;
3538 Items::animationLibrary.masAni->currentPosition = 0;
3539 del = true;
3541 if (del) {}
3542 else if (poke) {
3543 if (tab == 1 || tab == 5) {
3544 Items::animationLibrary.pokeFake->assignFrameToLocation(x - Graphics::prcnt(0.15, 'x', Items::w1), y - Graphics::prcnt(0.00, 'y', Items::w1));
3545 Items::animationLibrary.pokeFake->assignedFrameCopies.back()->setMovementPattern(
3546 x - Graphics::prcnt(0.15, 'x', Items::w1), y - Graphics::prcnt(0.00, 'y', Items::w1),
3547 x - Graphics::prcnt(0.135, 'x', Items::w1), y - Graphics::prcnt(0.015, 'y', Items::w1),
3548 1.0);
3550 else if (tab == 2 || tab == 4) {
3551 Items::animationLibrary.handFake->assignFrameToLocation(x - Graphics::prcnt(0.08, 'x', Items::w1), y - Graphics::prcnt(0.09, 'y', Items::w1));
3552 Items::animationLibrary.handFake->assignedFrameCopies.back()->setMovementPattern(
3553 x - Graphics::prcnt(0.08, 'x', Items::w1), y - Graphics::prcnt(0.09, 'y', Items::w1),
3554 x - Graphics::prcnt(0.08, 'x', Items::w1), y - Graphics::prcnt(0.09, 'y', Items::w1),
3555 1.0);
3557 else if (maBuy == true){
3558 int i, j;
3559 SDL_GetWindowSize(Items::w1, &i, &j);
3560 masYStore = ((double)y) / j;
3561 semYLocation = masYStore + scrlPrcnt * yClip;
3562 std::cout << semYLocation << "\n";
3563 if (semYLocation > 1.15) {
3564 masYStore = masYStore + (1.15 - semYLocation);
3565 std::cout << masYStore << " YStoreOFF\n";
3567 else std::cout << masYStore << " YStoreON\n";
3569 Items::animationLibrary.masAni->setLocations(Graphics::prcnt(0.0, 'x', Items::w1), Graphics::prcnt(masYStore, 'x', Items::w1));
3570 maAni = true;
3573 else if (moAni && hoverMo) {
3574 moAni = false;
3575 Items::mio->resetDistanceCounter();
3577 else if (feAni && hoverMo) {
3578 feAni = false;
3579 Items::animationLibrary.felAni->currentPosition = 0;
3581 else if (feSel && hoverMo) {
3582 feAni = true;
3584 else if (moSel && hoverMo) {
3585 moAni = true;
3587 else if (haAni && hoverHa) {
3588 haAni = false;
3589 Items::mio->resetDistanceCounter();
3591 else if (haSel && hoverHa) {
3592 haAni = true;
3594 else if (fiAni && hoverFi) {
3595 fiAni = false;
3596 Items::mio->resetDistanceCounter();
3598 else if (fiSel && hoverFi) {
3599 fiAni = true;
3601 else if (lPinchAni && hoverLPinch) {
3602 lPinchAni = false;
3603 Items::mio->resetDistanceCounter();
3605 else if (piSel && hoverLPinch) {
3606 lPinchAni = true;
3608 else if (rPinchAni && hoverRPinch) {
3609 rPinchAni = false;
3610 Items::mio->resetDistanceCounter();
3612 else if (piSel && hoverRPinch) {
3613 rPinchAni = true;
3615 else if (brAni || noBrAni && hoverBre) {
3616 noBrAni = false;
3617 brAni = false;
3619 else if (brSel && hoverBre && shirtOn) {
3620 noBrAni = true;
3622 else if (brSel && hoverBre && !shirtOn) {
3623 brAni = true;
3625 else if (thAni && hoverThi) {
3626 thAni = false;
3628 else if (thSel && hoverThi) {
3629 thAni = true;
3631 else {
3632 if (tab == 1 || tab == 5) {
3633 Items::animationLibrary.pokeFake->assignFrameToLocation(x - Graphics::prcnt(0.15, 'x', Items::w1), y - Graphics::prcnt(0.00, 'y', Items::w1));
3634 Items::animationLibrary.pokeFake->assignedFrameCopies.back()->setMovementPattern(
3635 x - Graphics::prcnt(0.15, 'x', Items::w1), y - Graphics::prcnt(0.00, 'y', Items::w1),
3636 x - Graphics::prcnt(0.135, 'x', Items::w1), y - Graphics::prcnt(0.015, 'y', Items::w1),
3637 1.0);
3640 else if (tab == 2 || tab == 4) {
3641 Items::animationLibrary.handFake->assignFrameToLocation(x - Graphics::prcnt(0.08, 'x', Items::w1), y - Graphics::prcnt(0.09, 'y', Items::w1));
3642 Items::animationLibrary.handFake->assignedFrameCopies.back()->setMovementPattern(
3643 x - Graphics::prcnt(0.08, 'x', Items::w1), y - Graphics::prcnt(0.09, 'y', Items::w1),
3644 x - Graphics::prcnt(0.08, 'x', Items::w1), y - Graphics::prcnt(0.09, 'y', Items::w1),
3645 1.0);
3647 else if (maBuy == true){
3648 int i, j;
3649 SDL_GetWindowSize(Items::w1, &i, &j);
3650 masYStore = ((double)y) / j;
3651 semYLocation = masYStore + scrlPrcnt * yClip;
3652 std::cout << semYLocation << "\n";
3653 if (semYLocation > 1.15) {
3654 masYStore = masYStore + (1.15 - semYLocation);
3655 std::cout << masYStore << " YStoreOFF\n";
3657 else std::cout << masYStore << " YStoreON\n";
3659 Items::animationLibrary.masAni->setLocations(Graphics::prcnt(0.0, 'x', Items::w1), Graphics::prcnt(masYStore, 'x', Items::w1));
3660 maAni = true;
3665 moSel = moBuy && !feSel; feSel = feBuy && !moSel;
3666 piSel = niBuy && !brSel; brSel = brBuy && !piSel;
3667 haSel = haBuy; fiSel = fiBuy;
3668 maSel = maBuy;
3669 thSel = thBuy;
3671 // std::cout << hoverHa << "\n";
3674 #include <iterator>
3675 int maxRand;
3676 bool evntHappening;
3677 int now;
3678 int timer;
3679 bool moSFX, feSFX, fiSFX, masSFX, moanSFX, moanOn;
3680 bool heartSlow, heartMed, heartFast, fail;
3681 bool heartStopped = true;
3682 void checkChannelDone(int i) {
3683 heartStopped = true;
3685 void play() {
3686 if (awareCounter > 10000) {
3687 Mix_FadeOutChannel(2, 500);
3688 Mix_FadeOutChannel(3, 500);
3689 if (!fail) {
3690 Items::sfxLibrary.failSFX->playSFX();
3691 fail = true;
3693 heartSlow = false;
3694 heartMed = false;
3695 heartFast = false;
3696 heartStopped = false;
3698 else if (awareCounter > 9500) {
3699 //if (!heartFast) {
3700 //Mix_FadeOutChannel(2, 50);
3701 Mix_ChannelFinished(checkChannelDone);
3702 if (heartStopped) {
3703 Items::sfxLibrary.heartFastSFX->playSFX(2, 0);
3704 heartFast = true;
3705 heartMed = false;
3706 heartSlow = false;
3707 heartStopped = false;
3709 //}
3711 else if (awareCounter > 9000) {
3712 //if (!heartMed) {
3713 //Mix_FadeOutChannel(2, 50);
3714 Mix_ChannelFinished(checkChannelDone);
3715 if (heartStopped) {
3716 Items::sfxLibrary.heartMediumSFX->playSFX(2, 0);
3717 heartFast = false;
3718 heartMed = true;
3719 heartSlow = false;
3720 heartStopped = false;
3724 else if (awareCounter > 8000) {
3725 // if (!heartSlow) {
3726 //Mix_FadeOutChannel(2, 50);
3727 Mix_ChannelFinished(checkChannelDone);
3728 if (heartStopped) {
3729 Items::sfxLibrary.heartSlowSFX->playSFX(2, 0);
3730 heartFast = false;
3731 heartMed = false;
3732 heartSlow = true;
3733 heartStopped = false;
3737 else {
3738 Mix_FadeOutChannel(2, 1000);
3739 heartSlow = false;
3740 heartMed = false;
3741 heartFast = false;
3742 fail = false;
3745 if (!neutralSFX) {
3746 Items::sfxLibrary.neutSFX->playSFX(3, -1);
3747 neutralSFX = true;
3749 if (lPinchAni || rPinchAni || brAni || noBrAni) {
3750 moanOn = true;
3751 Mix_FadeOutChannel(3, 100);
3753 if (moAni) {
3754 moanOn = true;
3755 if (!moSFX) {
3756 moSFX = true;
3757 Mix_FadeOutChannel(3, 100);
3758 Items::sfxLibrary.moSFX->playSFX(4,-1);
3761 else if (feAni) {
3762 moanOn = true;
3763 if (!feSFX) {
3764 feSFX = true;
3765 Mix_FadeOutChannel(3, 100);
3766 Items::sfxLibrary.feSFX->playSFX(4,-1);
3769 else {
3770 if (moSFX || feSFX) Mix_FadeOutChannel(4,100);
3771 moSFX = false;
3772 feSFX = false;
3774 if (fiAni) {
3775 moanOn = true;
3776 if (!fiSFX) {
3777 fiSFX = true;
3778 Mix_FadeOutChannel(3, 100);
3779 Items::sfxLibrary.fiSFX->playSFX(5, -1);
3782 else {
3783 if(fiSFX) Mix_FadeOutChannel(5, 100);
3784 fiSFX = false;
3786 if (maAni) {
3787 //moanOn = true;
3788 if (!masSFX) {
3789 masSFX = true;
3790 Mix_FadeOutChannel(3, 100);
3791 Items::sfxLibrary.masSFX->playSFX(6, -1);
3794 else {
3795 if (masSFX) Mix_FadeOutChannel(6, 100);
3796 masSFX = false;
3798 if (moanOn) {
3799 moanOn = false;
3800 if (!moanSFX) {
3801 moanSFX = true;
3802 Items::sfxLibrary.moan1SFX->playSFX(7, -1);
3805 else {
3806 if (moanSFX) {
3807 Mix_FadeOutChannel(7, 100);
3808 neutralSFX = false;
3810 moanSFX = false;
3813 if (Prompts::promptTab) {
3814 Items::sfxLibrary.SelectionSFX2->playSFX();
3815 Prompts::promptTab = false;
3818 if (levelSound && !levelSoundHold) {
3819 levelSoundHold = true;
3820 Items::sfxLibrary.pointsSFX->playSFX();
3822 if (errorSound) {
3823 errorSound = false;
3824 Items::sfxLibrary.errorSFX->playSFX();
3826 else if (LCLICK) {
3827 if ((hoverSel1 || hoverSel2 || hoverSel3) && tab < 4) {
3828 Items::sfxLibrary.SelectionSFX->playSFX();
3830 else if (tab == 4) {
3831 if (hoverSel1) {
3832 if (blSel)
3833 Items::sfxLibrary.DerobeSFX->playSFX();
3834 else
3835 Items::sfxLibrary.RobeSFX->playSFX();
3837 else if (hoverSel2) {
3838 if (tieSel)
3839 Items::sfxLibrary.DerobeSFX->playSFX();
3840 else
3841 Items::sfxLibrary.RobeSFX->playSFX();
3843 else if (hoverSel3) {
3844 if (shirtSel)
3845 Items::sfxLibrary.DerobeSFX->playSFX();
3846 else
3847 Items::sfxLibrary.RobeSFX->playSFX();
3850 else if (tab == 5) {
3851 if (hoverSel1) {
3852 if (skSel)
3853 Items::sfxLibrary.DerobeSFX->playSFX();
3854 else
3855 Items::sfxLibrary.RobeSFX->playSFX();
3857 else if (hoverSel2) {
3858 if (paSel)
3859 Items::sfxLibrary.DerobeSFX->playSFX();
3860 else
3861 Items::sfxLibrary.RobeSFX->playSFX();
3863 else if (hoverSel3) {
3864 if (thiSel)
3865 Items::sfxLibrary.DerobeSFX->playSFX();
3866 else
3867 Items::sfxLibrary.RobeSFX->playSFX();
3870 if (hoverR || hoverL|| hoverUDL || hoverUDR) {
3871 Items::sfxLibrary.OpenSFX->playSFX();
3873 else if (hoverCHCl3 || hoverInce) {
3874 Items::sfxLibrary.SelectionSFX2->playSFX();
3877 else if (Items::inputs->at(KEYPRESSED) && !Items::inputs->at(KEYHELD)) {
3878 if (true) {
3879 if (Items::inputs->at(NUM1) && !Items::inputs->at(NUM1_H)) {
3880 Items::sfxLibrary.SelectionSFX->playSFX();
3882 else if (Items::inputs->at(NUM2) && !Items::inputs->at(NUM2_H)) {
3883 if (niBuy) {
3884 Items::sfxLibrary.SelectionSFX->playSFX();
3888 if (Items::inputs->at(NUM3) && !Items::inputs->at(NUM3_H)) {
3889 if (fiBuy) {
3890 Items::sfxLibrary.SelectionSFX->playSFX();
3893 else if (Items::inputs->at(NUM4) && !Items::inputs->at(NUM4_H)) {
3894 if (haBuy) {
3895 Items::sfxLibrary.SelectionSFX->playSFX();
3898 else if (Items::inputs->at(NUM5) && !Items::inputs->at(NUM5_H)) {
3899 if (thBuy) {
3900 Items::sfxLibrary.SelectionSFX->playSFX();
3903 else if (Items::inputs->at(NUM6) && !Items::inputs->at(NUM6_H)) {
3904 if (brBuy) {
3905 Items::sfxLibrary.SelectionSFX->playSFX();
3908 else if (Items::inputs->at(NUM7) && !Items::inputs->at(NUM7_H)) {
3909 if (maBuy) {
3910 Items::sfxLibrary.SelectionSFX->playSFX();
3913 else if (Items::inputs->at(NUM8) && !Items::inputs->at(NUM8_H)) {
3914 if (feBuy) {
3915 Items::sfxLibrary.SelectionSFX->playSFX();
3918 else if (Items::inputs->at(NUM9) && !Items::inputs->at(NUM9_H)) {
3919 if (xxBuy) {
3920 Items::sfxLibrary.SelectionSFX->playSFX();
3923 else if (Items::inputs->at(KEYQ) && !Items::inputs->at(KEYQ_H)) {
3924 if (blBuy) {
3925 if (blOn)
3926 Items::sfxLibrary.DerobeSFX->playSFX();
3927 else
3928 Items::sfxLibrary.RobeSFX->playSFX();
3931 if (Items::inputs->at(KEYW) && !Items::inputs->at(KEYW_H)) {
3932 if (tieBuy) {
3933 if (tieOn)
3934 Items::sfxLibrary.DerobeSFX->playSFX();
3935 else
3936 Items::sfxLibrary.RobeSFX->playSFX();
3939 else if (Items::inputs->at(KEYE) && !Items::inputs->at(KEYE_H)) {
3940 if (shirtBuy) {
3941 if (shirtOn)
3942 Items::sfxLibrary.DerobeSFX->playSFX();
3943 else
3944 Items::sfxLibrary.RobeSFX->playSFX();
3947 else if (Items::inputs->at(KEYR) && !Items::inputs->at(KEYR_H)) {
3948 if (skBuy) {
3949 if (skOn)
3950 Items::sfxLibrary.DerobeSFX->playSFX();
3951 else
3952 Items::sfxLibrary.RobeSFX->playSFX();
3955 else if (Items::inputs->at(KEYT) && !Items::inputs->at(KEYT_H)) {
3956 if (paBuy) {
3957 if (paOn)
3958 Items::sfxLibrary.DerobeSFX->playSFX();
3959 else
3960 Items::sfxLibrary.RobeSFX->playSFX();
3963 else if (Items::inputs->at(KEYY) && !Items::inputs->at(KEYY_H)) {
3964 if (thiBuy) {
3965 if (thiOn)
3966 Items::sfxLibrary.DerobeSFX->playSFX();
3967 else
3968 Items::sfxLibrary.RobeSFX->playSFX();
3974 int diceRoll = Items::distribution(Items::generator);
3976 if (diceRoll < sfxCutOff && !evntHappening && start) {
3977 // std::cout << "\n\n" << SDL_GetTicks() / 1000 << " seconds: " << diceRoll << "\n\n";
3978 if (diceRoll < bangCutoff_1)
3979 Items::sfxLibrary.bangSFX->playSFX();
3980 else if (diceRoll < commsCutoff_2 )
3981 Items::sfxLibrary.IntercomSFX->playSFX();
3982 else if (diceRoll < hornCutoff_3)
3983 Items::sfxLibrary.HornSFX->playSFX();
3984 else if (diceRoll < passingCutoff_4)
3985 Items::sfxLibrary.PassingSFX->playSFX();
3986 //else if (diceRoll < lightningCutoff_5)
3987 // Items::sfxLibrary.LightningSFX->playSFX();
3989 evntHappening = true;
3990 now = SDL_GetTicks();
3992 if (evntHappening && (timer - now) > 15000) {
3993 evntHappening = false;
3996 int boxAlphaR = 120;
3998 int sub;
3999 int tStart;
4000 int tRepeat;
4001 int xv, yv;
4002 bool staydark;
4004 int rate = 10;
4005 bool pinch;
4006 int eyeOpenStart;
4007 int time;
4008 int eyeOpenTime = 1500;
4009 void render() {
4011 SDL_RenderClear(Items::r1);
4012 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
4014 timer = SDL_GetTicks();
4015 if (!start) {
4016 //std::cout << timer - startTime << " " << timer << " " << startTime << "\n";
4017 //sub = timer - startTime;
4018 if (sub < 3000)
4019 Items::gameGraphics.TextBG->renderTextureHScrolling(-5, 3, 0, Graphics::prcnt(-0.2, 'y', Items::w1));
4020 if ((sub) > 7000)
4021 start = Items::gameGraphics.TextWall->renderTextureFadeOut(1000);
4022 else
4023 start = Items::gameGraphics.TextWall->renderTextureScaleScrolling(-15, 2, ScreenWidth, Graphics::prcnt(-0.6, 'y', Items::w1), 10);
4025 else {
4026 Items::gameGraphics.TextLights->renderTextureScaleScrollingLoop(-10, 3, 0, 0.002, ScreenWidth, Graphics::prcnt(-0.80, 'y', Items::w1) - Graphics::prcnt((float)yClip * 0.05, 'y', Items::w1), 2, &growRect);
4029 Items::gameGraphics.MainBG->renderTextureClip(
4030 0, (float)yClip / 10,
4031 1.0, 1.0);
4032 //BODY
4033 Items::gameGraphics.CharacterBody->renderTextureClip(
4034 0, (float)yClip / 10,
4035 1.0, 1.0);
4036 //BREASTS
4037 //std::cout << lPinchAni << "lpia\n";
4038 if (!noBrAni)
4039 Items::gameGraphics.CharacterTorso->renderTexture(0.000, -scrlPrcnt * yClip);
4040 if(!lPinchAni && !brAni && !noBrAni)
4041 Items::gameGraphics.CharacterLBreast->renderTexture(0.000, -scrlPrcnt * yClip);
4042 if(!rPinchAni && !brAni && !noBrAni)
4043 Items::gameGraphics.CharacterRBreast->renderTexture(0.000, -scrlPrcnt * yClip);
4046 //FACE
4047 if (openEyes) {
4048 Items::animationLibrary.eyesAni->frames.at(4)->renderTexture();
4049 time = SDL_GetTicks();
4051 if (awareCounter > 10000 || (Items::gameMode == 3 && (countdownTimer - timerStart) > deadlineTime)) {
4052 if (!openEyes && Items::animationLibrary.eyesAni->itterateOnce(30)) {
4053 openEyes = true;
4054 eyeOpenStart = SDL_GetTicks();
4057 else Items::animationLibrary.idleAni->itterateAnimation(24);
4060 //SDL_RenderDrawRect(Items::r1, &Items::animationLibrary.idleAni->frames.at(0)->box);
4062 //used to keep points cycling when overtime
4063 if (Items::gameMode != 4)
4064 if(awareCounter <= 10000)
4065 calculatePoints(0, 0, false);
4066 else{
4067 //calculatePoints(0, 0, falseac);
4070 //CLOTHING
4071 if (true) {
4072 //LEG
4073 Items::gameGraphics.CharacterLeg->renderTexture(0.000, -scrlPrcnt * yClip);
4074 //THH
4075 if (thiOn) {
4076 if (thiFade < 255) {
4077 thiFade += rate;
4078 if (thiFade > 255) thiFade = 255;
4080 Items::gameGraphics.thh->setTransparency(thiFade);
4081 Items::gameGraphics.thh->renderTexture(0.0000, -scrlPrcnt * yClip);
4083 else {
4084 if (thiFade > 0) {
4085 thiFade -= rate;
4086 if (thiFade < 0) thiFade = 0;
4088 Items::gameGraphics.thh->setTransparency(thiFade);
4089 Items::gameGraphics.thh->renderTexture(0.0000, -scrlPrcnt * yClip);
4091 if (semLegActive) {
4092 Items::gameGraphics.semLeg->renderTextureFadeIn(1000);
4094 if (paOn) {
4095 if (paFade < 255) {
4096 paFade += rate;
4097 if (paFade > 255) paFade = 255;
4099 if (moisFade > 0) {
4100 moisFade -= rate;
4101 if (moisFade < 0) moisFade = 0;
4103 Items::gameGraphics.pa->setTransparency(paFade);
4104 Items::gameGraphics.pa->renderTexture(0.0, -scrlPrcnt * yClip);
4105 Items::gameGraphics.paMois->setTransparency(paFade * ((double) moisAlpha / 255.0));
4106 Items::gameGraphics.paMois->renderTexture(0.0, -scrlPrcnt * yClip);
4107 Items::gameGraphics.mois->setTransparency(moisFade * ((double)moisAlpha / 255.0));
4108 Items::gameGraphics.mois->renderTexture(0.0, -scrlPrcnt * yClip);
4110 else {
4111 if (paFade > 0) {
4112 paFade -= rate;
4113 if (paFade < 0) paFade = 0;
4114 mFad = abs(moisAlpha / (paFade - 254));
4116 if (moisFade < 255) {
4117 moisFade += rate;
4118 if (moisFade > 255) moisFade = 255;
4120 Items::gameGraphics.pa->setTransparency(paFade);
4121 Items::gameGraphics.pa->renderTexture(0.0, -scrlPrcnt * yClip);
4122 Items::gameGraphics.paMois->setTransparency(paFade * ((double)moisAlpha / 255.0));
4123 Items::gameGraphics.paMois->renderTexture(0.0, -scrlPrcnt * yClip);
4124 Items::gameGraphics.mois->setTransparency(moisFade * ((double)moisAlpha / 255.0));
4125 Items::gameGraphics.mois->renderTexture(0.0, -scrlPrcnt * yClip);
4127 if (skOn) {
4128 if (skFade < 255) {
4129 skFade += rate;
4130 if (skFade > 255) skFade = 255;
4132 Items::gameGraphics.skirt->setTransparency(skFade);
4133 Items::gameGraphics.skirt->renderTexture(0.0, -scrlPrcnt * yClip);
4135 else {
4136 if (skFade > 0) {
4137 skFade -= rate;
4138 if (skFade < 0) skFade = 0;
4140 Items::gameGraphics.skirt->setTransparency(skFade);
4141 Items::gameGraphics.skirt->renderTexture(0.0, -scrlPrcnt * yClip);
4143 //Breasts open
4145 if (brAni) {
4146 if (semBrActive) {
4147 Items::gameGraphics.semBre->renderTextureFadeIn(1000);
4149 bool frameMove = Items::animationLibrary.noBreAni->itterateAnimation(35);
4150 if (Items::gameMode != 4)
4151 calculatePoints(3000, 8200, frameMove);
4152 else
4153 calculatePoints(1, 2, frameMove);
4154 //Use method to calculate points
4155 moveMo = false;
4156 aRadius = 0.10;
4157 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
4159 else if(false){
4161 //breclosed
4162 else if (noBrAni) {
4163 if (semBrActive) {
4164 Items::gameGraphics.semBre->renderTextureFadeIn(1000);
4166 bool frameMove = Items::animationLibrary.breAni->itterateAnimation(35);
4167 if (Items::gameMode != 4)
4168 calculatePoints(4000, 2000, frameMove);
4169 else
4170 calculatePoints(1, 2, frameMove);
4171 //Use method to calculate points
4172 moveMo = false;
4173 aRadius = 0.10;
4174 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
4176 else if (false) {
4178 else {
4179 if (shirtOn) {
4180 if (blOn) {
4181 if (shirtFade < 255) {
4182 shirtFade += rate;
4183 if (shirtFade > 255) shirtFade = 255;
4185 Items::gameGraphics.shirt->setTransparency(shirtFade);
4186 Items::gameGraphics.shirt->renderTextureClip(0.000, (double)-scrlPrcnt * yClip, 0.0, 0.0, 0.76, 1.0);
4188 else {
4189 if (shirtFade < 255) {
4190 shirtFade += rate;
4191 if (shirtFade > 255) shirtFade = 255;
4193 Items::gameGraphics.shirt->setTransparency(shirtFade);
4194 Items::gameGraphics.shirt->renderTexture(0.000, -scrlPrcnt * yClip);
4197 else {
4198 if (blOn) {
4199 if (shirtFade > 0) {
4200 shirtFade -= rate;
4201 if (shirtFade < 0) shirtFade = 0;
4203 Items::gameGraphics.shirt->setTransparency(shirtFade);
4204 Items::gameGraphics.shirt->renderTextureClip(0.000, (double)-scrlPrcnt * yClip, 0.0, 0.0, 0.76, 1.0);
4206 else {
4207 if (shirtFade > 0) {
4208 shirtFade -= rate;
4209 if (shirtFade < 0) shirtFade = 0;
4211 Items::gameGraphics.shirt->setTransparency(shirtFade);
4212 Items::gameGraphics.shirt->renderTexture(0.000, -scrlPrcnt * yClip);
4215 if (tieOn) {
4216 if (!shirtOn) {
4217 if (tieTopFade < 255) {
4218 tieTopFade += rate;
4219 if (tieTopFade > 255) tieTopFade = 255;
4221 Items::gameGraphics.tieTop->setTransparency(tieTopFade);
4222 Items::gameGraphics.tieTop->renderTexture(0.0000, -scrlPrcnt * yClip);
4224 else {
4225 if (tieTopFade > 0) {
4226 tieTopFade -= rate;
4227 if (tieTopFade < 0) tieTopFade = 0;
4229 Items::gameGraphics.tieTop->setTransparency(tieTopFade);
4230 Items::gameGraphics.tieTop->renderTexture(0.0000, -scrlPrcnt * yClip);
4233 if (tieFade < 255) {
4234 tieFade += rate;
4235 if (tieFade > 255) tieFade = 255;
4237 Items::gameGraphics.tie->setTransparency(tieFade);
4238 Items::gameGraphics.tie->renderTexture(0.0000, -scrlPrcnt * yClip);
4240 else {
4241 if (tieTopFade > 0) {
4242 tieTopFade -= rate;
4243 if (tieTopFade < 0) tieTopFade = 0;
4245 Items::gameGraphics.tieTop->setTransparency(tieTopFade);
4246 Items::gameGraphics.tieTop->renderTexture(0.0000, -scrlPrcnt * yClip);
4248 if (tieFade > 0) {
4249 tieFade -= rate;
4250 if (tieFade < 0) tieFade = 0;
4252 Items::gameGraphics.tie->setTransparency(tieFade);
4253 Items::gameGraphics.tie->renderTexture(0.0000, -scrlPrcnt * yClip);
4256 //ANIS
4257 if (blOn) {
4258 if (blFade < 255) {
4259 blFade += rate;
4260 if (blFade > 255) blFade = 255;
4262 Items::gameGraphics.bla->setTransparency(blFade);
4263 Items::gameGraphics.bla->renderTexture(0.0, -scrlPrcnt * yClip);
4265 else {
4266 if (blFade > 0) {
4267 blFade -= rate;
4268 if (blFade < 0) blFade = 0;
4270 Items::gameGraphics.bla->setTransparency(blFade);
4271 Items::gameGraphics.bla->renderTexture(0.0, -scrlPrcnt * yClip);
4273 if (semBrActive) {
4274 Items::gameGraphics.semBre->renderTextureFadeIn(1000);
4280 if (true) {
4281 //LNI
4282 pinch = false;
4283 if (lPinchAni && !shirtOn && !blOn) {
4284 if (LHELD && hoverLPinch) {
4285 Items::mio->trackDestopMouse(&x, &y);
4287 bool frameMove = Items::animationLibrary.lPiAni->itterateAnimation(Items::mio->calculateMouseDistance(x, y, 10), 0, 1);
4288 pinch = true;
4289 moveLPi = true;
4290 if(Items::gameMode != 4)
4291 calculatePoints(4000, 8200, frameMove);
4292 else
4293 calculatePoints(1, 2, frameMove);
4294 //Use method to calculate points
4296 aRadius = 1.5;
4297 lpHitBoxX = Graphics::prcnt(0.0, 'x', Items::w1); lpHitBoxY = Graphics::prcnt(0.0, 'y', Items::w1);
4298 Items::mio->trackGameMouse(&x, &y);
4300 else {
4301 bool frameMove = Items::animationLibrary.lPiAni->itterateAnimation(35);
4302 //Items::animationLibrary.lPiAni->frames.at(0)->renderTexture();
4303 if (Items::gameMode != 4)
4304 calculatePoints(4000, 8200, frameMove);
4305 else
4306 calculatePoints(1, 2, frameMove);
4307 //Use method to calculate points
4308 pinch = true;
4309 moveLPi = false;
4310 aRadius = 0.10;
4311 lpHitBoxX = Graphics::prcnt(0.32, 'x', Items::w1); lpHitBoxY = Graphics::prcnt(0.814, 'y', Items::w1) - yClip * scrollRate;
4314 else {
4315 moveLPi = false;
4316 aRadius = 0.10;;
4317 Items::animationLibrary.lPiAni->currentPosition = 0;
4318 lpHitBoxX = Graphics::prcnt(0.32, 'x', Items::w1); lpHitBoxY = Graphics::prcnt(0.814, 'y', Items::w1) - yClip * scrollRate;
4321 //RNI
4322 if (rPinchAni && !shirtOn && !blOn) {
4323 if (LHELD && hoverRPinch) {
4324 Items::mio->trackDestopMouse(&x, &y);
4325 bool frameMove = Items::animationLibrary.rPiAni->itterateAnimation(Items::mio->calculateMouseDistance(x, y, 10), 0, 1);
4326 if (Items::gameMode != 4)
4327 calculatePoints(4000, 8000, frameMove);
4328 else
4329 calculatePoints(1, 2, frameMove);
4330 //Use method to calculate points
4331 pinch = true;
4332 moveRPi = true;
4334 aRadius = 1.5;
4335 rpHitBoxX = Graphics::prcnt(0.0, 'x', Items::w1); rpHitBoxY = Graphics::prcnt(0.0, 'y', Items::w1);
4336 Items::mio->trackGameMouse(&x, &y);
4338 else {
4339 bool frameMove = Items::animationLibrary.rPiAni->itterateAnimation(35);
4340 //Items::animationLibrary.rPiAni->frames.at(0)->renderTexture();
4341 if (Items::gameMode != 4)
4342 calculatePoints(4000, 8000, frameMove);
4343 else
4344 calculatePoints(1, 2, frameMove);
4345 //Use method to calculate points
4346 pinch = true;
4347 moveRPi = false;
4349 aRadius = 0.10;
4350 rpHitBoxX = Graphics::prcnt(0.53, 'x', Items::w1); rpHitBoxY = Graphics::prcnt(0.852, 'y', Items::w1) - yClip * scrollRate;
4353 else {
4354 moveRPi = false;
4355 aRadius = 0.10;;
4356 rpHitBoxX = Graphics::prcnt(0.53, 'x', Items::w1); rpHitBoxY = Graphics::prcnt(0.852, 'y', Items::w1) - yClip * scrollRate;
4357 Items::animationLibrary.rPiAni->currentPosition = 0;
4359 //FI
4360 if (fiAni && !skOn) {
4361 if (LHELD && hoverFi) {
4362 Items::mio->trackDestopMouse(&x, &y);
4363 moveFi = true;
4364 bool frameMove = Items::animationLibrary.fiAni->itterateAnimation(Items::mio->calculateMouseDistance(x, y, 10), 0, 1);
4365 if (Items::gameMode != 4)
4366 calculatePoints(3000, 8000, frameMove);
4367 else
4368 calculatePoints(1, 2, frameMove);
4369 //Use method to calculate points
4371 if (moisAlpha < 255) {
4372 moisAlpha++;
4375 aRadius = 1.5;
4376 fiHitBoxX = Graphics::prcnt(0.0, 'x', Items::w1); fiHitBoxY = Graphics::prcnt(0.0, 'y', Items::w1);
4377 Items::mio->trackGameMouse(&x, &y);
4379 else {
4380 bool frameMove = Items::animationLibrary.fiAni->itterateAnimation(35);
4381 if (Items::gameMode != 4)
4382 calculatePoints(3000, 8000, frameMove);
4383 else
4384 calculatePoints(1, 2, frameMove);
4385 //Use method to calculate points
4387 if (moisAlpha < 255) {
4388 moisAlpha++;
4391 moveFi = false;
4392 aRadius = 0.10;
4393 fiHitBoxX = Graphics::prcnt(0.4, 'x', Items::w1); fiHitBoxY = Graphics::prcnt(1.15, 'y', Items::w1) - yClip * scrollRate;
4395 Items::gameGraphics.CharacterLeg->renderTexture(0.000, -scrlPrcnt * yClip);
4396 if (thiOn) {
4397 if (thiFade < 255) {
4398 thiFade += rate;
4399 if (thiFade > 255) thiFade = 255;
4401 Items::gameGraphics.thh->setTransparency(thiFade);
4402 Items::gameGraphics.thh->renderTexture(0.0000, -scrlPrcnt * yClip);
4403 if (semLegActive) {
4404 Items::gameGraphics.semLeg->renderTextureFadeIn(1000);
4407 else {
4408 if (thiFade > 0) {
4409 thiFade -= rate;
4410 if (thiFade < 0) thiFade = 0;
4412 Items::gameGraphics.thh->setTransparency(thiFade);
4413 Items::gameGraphics.thh->renderTexture(0.0000, -scrlPrcnt * yClip);
4416 else {
4417 moveFi = false;
4418 aRadius = 0.10;;
4419 fiHitBoxX = Graphics::prcnt(0.4, 'x', Items::w1); fiHitBoxY = Graphics::prcnt(1.15, 'y', Items::w1) - yClip * scrollRate;
4423 //HAIR&MOUTH&&POKES
4424 if (true) {
4425 if (thAni) {
4426 bool frameMove = Items::animationLibrary.thiAni->itterateAnimation(35);
4427 if (Items::gameMode != 4)
4428 calculatePoints(6000, 4000, frameMove);
4429 else
4430 calculatePoints(1, 2, frameMove);
4431 //Use method to calculate points
4432 moveMo = false;
4433 aRadius = 0.10;
4434 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
4436 else {
4439 //HAIR L half
4440 Items::gameGraphics.CharacterHair->renderTexture(0.0, -yClip * scrlPrcnt);
4442 if (semHaActive) {
4443 Items::gameGraphics.semHair->renderTextureFadeIn(1000);
4445 if (semStoActive) {
4446 Items::gameGraphics.semSto->renderTextureFadeIn(1000);
4448 if (semMoActive) {
4449 Items::gameGraphics.semMo->renderTextureFadeIn(1000);
4451 if (feAni) {
4452 bool frameMove = Items::animationLibrary.felAni->itterateAnimation(35);
4453 if (Items::animationLibrary.felAni->currentPosition > 94) {
4454 if (!semMoActive) {
4455 expPoints += 50;
4456 if(Items::gameMode != 1)
4457 Items::sfxLibrary.pointsSFX->playSFX();
4459 semMoActive = true;
4461 if (Items::gameMode != 4)
4462 calculatePoints(4000, 8000, frameMove);
4463 else
4464 calculatePoints(1, 2, frameMove);
4465 //Use method to calculate points
4466 moveMo = false;
4467 aRadius = 0.10;
4468 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
4470 //MOUTH
4471 else if (moAni) {
4472 if (LHELD && hoverMo) {
4473 Items::mio->trackDestopMouse(&x, &y);
4475 bool frameMove = Items::animationLibrary.moAni->itterateAnimation(Items::mio->calculateMouseDistance(x, y, 10), 0, 1);
4476 if (Items::gameMode != 4)
4477 calculatePoints(8000, 5000, frameMove);
4478 else
4479 calculatePoints(1, 2, frameMove);
4480 //Use method to calculate points
4481 moveMo = true;
4482 aRadius = 1.5;
4483 //moHitBoxX = Graphics::prcnt(0.0, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.0, 'y', Items::w1);
4484 Items::mio->trackGameMouse(&x, &y);
4486 else {
4487 bool frameMove = Items::animationLibrary.moAni->itterateAnimation(35);
4488 if (Items::gameMode != 4)
4489 calculatePoints(8000, 5000, frameMove);
4490 else
4491 calculatePoints(1, 2, frameMove);
4492 //Use method to calculate points
4493 moveMo = false;
4494 aRadius = 0.10;
4495 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
4498 else {
4499 aRadius = 0.10;;
4500 moveMo = false;
4501 moHitBoxX = Graphics::prcnt(0.6, 'x', Items::w1); moHitBoxY = Graphics::prcnt(0.440, 'y', Items::w1) - yClip * scrollRate;
4502 Items::animationLibrary.moAni->currentPosition = 0;
4504 bool hair = false;
4505 //Hair r half
4506 if (haAni) {
4507 if (LHELD && hoverHa) {
4508 Items::mio->trackDestopMouse(&x, &y);
4509 hair = true;
4510 moveHa = true;
4511 bool frameMove = Items::animationLibrary.haAni->itterateAnimation(Items::mio->calculateMouseDistance(x, y, 10), 0, 1, 1, 48);
4512 calculatePoints(8000, 8000, frameMove);
4513 //Use method to calculate points
4514 Items::mio->trackGameMouse(&x, &y);
4516 else {
4517 bool frameMove = Items::animationLibrary.haAni->itterateAnimationStartEnd(35, 1, 48);
4518 calculatePoints(8000, 8000, frameMove);
4519 //Use method to calculate points
4520 hair = true;
4521 moveHa = false;
4522 //Items::animationLibrary.haAni->frames.at(0)->renderTexture();
4524 aRadius = 0.10;
4527 else {
4528 aRadius = 0.10;
4529 moveHa = false;
4530 Items::animationLibrary.haAni->currentPosition = 0;
4532 if (!hair) {
4533 Items::animationLibrary.haAni->frames.at(0)->renderTexture();
4535 for each(Graphics* g in Items::animationLibrary.pokeFake->assignedFrameCopies) {
4536 bool frameMove = g->singleFrameAnimate(35);
4537 g->renderSingleFrame();
4538 if (
4539 GenericGameTools::checkRectHitBox(torso, g->box.x + g->box.w, g->box.y) ||
4540 GenericGameTools::checkRectHitBox(head, g->box.x + g->box.w, g->box.y) ||
4541 GenericGameTools::checkRectHitBox(lArm, g->box.x + g->box.w, g->box.y) ||
4542 GenericGameTools::checkRectHitBox(rArm, g->box.x + g->box.w, g->box.y) ||
4543 GenericGameTools::checkRectHitBox(pelvis, g->box.x + g->box.w, g->box.y) ||
4544 GenericGameTools::checkRectHitBox(lLeg, g->box.x + g->box.w, g->box.y) ||
4545 GenericGameTools::checkRectHitBox(rLeg, g->box.x + g->box.w, g->box.y))
4546 if (Items::gameMode != 4)
4547 calculatePoints(10000, 7000, frameMove);
4548 else
4549 calculatePoints(1, 2, frameMove);
4550 #ifdef HBOX
4551 SDL_RenderFillRect(Items::r1, &g->box);
4552 #endif // HBOX
4554 for each(Graphics* g in Items::animationLibrary.handFake->assignedFrameCopies) {
4555 bool frameMove = g->singleFrameAnimate(35);
4556 g->singleFrameRotate(35, 1);
4557 g->renderSingleFrame();
4558 if (
4559 GenericGameTools::checkRectHitBox(torso, g->box.x + g->box.w, g->box.y) ||
4560 GenericGameTools::checkRectHitBox(head, g->box.x + g->box.w, g->box.y) ||
4561 GenericGameTools::checkRectHitBox(lArm, g->box.x + g->box.w, g->box.y) ||
4562 GenericGameTools::checkRectHitBox(rArm, g->box.x + g->box.w, g->box.y) ||
4563 GenericGameTools::checkRectHitBox(pelvis, g->box.x + g->box.w, g->box.y) ||
4564 GenericGameTools::checkRectHitBox(lLeg, g->box.x + g->box.w, g->box.y) ||
4565 GenericGameTools::checkRectHitBox(rLeg, g->box.x + g->box.w, g->box.y))
4566 if (Items::gameMode != 4)
4567 calculatePoints(10000, 7000, frameMove);
4568 else
4569 calculatePoints(1, 2, frameMove);
4570 #ifdef HBOX
4571 SDL_RenderFillRect(Items::r1, &g->box);
4572 #endif // HBOX
4574 if (maAni) {
4575 Items::animationLibrary.masAni->itterateAnimation(35);
4576 if (Items::animationLibrary.masAni->currentPosition > 98) {
4577 if (semYLocation < 0.55) {
4578 if (!semHaActive) {
4579 expPoints += 50;
4580 if (Items::gameMode != 1)
4581 Items::sfxLibrary.pointsSFX->playSFX();
4583 semHaActive = true;
4585 else if (semYLocation < 0.86) {
4586 if (!semBrActive){
4587 expPoints += 50;
4588 if (Items::gameMode != 1)
4589 Items::sfxLibrary.pointsSFX->playSFX();
4591 semBrActive = true;
4593 else if (semYLocation < 1.05) {
4594 if (!semStoActive) {
4595 expPoints += 50;
4596 if (Items::gameMode != 1)
4597 Items::sfxLibrary.pointsSFX->playSFX();
4599 semStoActive = true;
4601 else {
4602 if (!semLegActive) {
4603 expPoints += 50;
4604 if (Items::gameMode != 1)
4605 Items::sfxLibrary.pointsSFX->playSFX();
4607 semLegActive = true;
4613 if (LHELD && (haAni || moAni || fiAni || pinch || fiAni )) {
4614 aRadius = 1.5;
4616 else aRadius = 0.1;
4619 #ifdef HBOX
4620 SDL_SetRenderDrawColor(Items::r1, 200, 0, 200, 180);
4621 SDL_Rect r1 = { moHitBoxX, moHitBoxY - yClip * scrollRate,-Graphics::prcnt(aRadius , 'x', Items::w1) , Graphics::prcnt(aRadius , 'y', Items::w1) };
4622 SDL_Rect r3 = { lpHitBoxX, lpHitBoxY - yClip * scrollRate,-Graphics::prcnt(aRadius , 'x', Items::w1) , Graphics::prcnt(aRadius , 'y', Items::w1) };
4623 SDL_Rect r4 = { rpHitBoxX, rpHitBoxY - yClip * scrollRate,-Graphics::prcnt(aRadius , 'x', Items::w1) , Graphics::prcnt(aRadius , 'y', Items::w1) };
4624 SDL_Rect r5 = { fiHitBoxX, fiHitBoxY - yClip * scrollRate,-Graphics::prcnt(aRadius , 'x', Items::w1) , Graphics::prcnt(aRadius , 'y', Items::w1) };
4625 SDL_Rect r6 = { thiHitBoxX, thiHitBoxY - yClip * scrollRate,-Graphics::prcnt(cRadius , 'x', Items::w1) , Graphics::prcnt(cRadius , 'y', Items::w1) };
4626 SDL_RenderFillRect(Items::r1, &r1);
4627 SDL_RenderFillRect(Items::r1, &haHitBox1);
4628 SDL_RenderFillRect(Items::r1, &haHitBox2);
4629 SDL_RenderFillRect(Items::r1, &haHitBox3);
4630 SDL_RenderFillRect(Items::r1, &haHitBox4);
4631 SDL_RenderFillRect(Items::r1, &breastHitBox);
4633 SDL_RenderFillRect(Items::r1, &r3);
4634 SDL_RenderFillRect(Items::r1, &r4);
4635 SDL_RenderFillRect(Items::r1, &r5);
4636 SDL_SetRenderDrawColor(Items::r1, 200, 200, 0, 180);
4637 SDL_RenderFillRect(Items::r1, &r6);
4638 #endif
4639 if (!ctrlClick) {
4640 if (start) {
4641 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, GenericGameTools::incrementAtRate(0, 190, 500));
4642 SDL_Rect fullBox = SDL_Rect{ 0,0, ScreenWidth, ScreenHeight };
4643 SDL_RenderFillRect(Items::r1, &fullBox);
4646 else {
4647 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, GenericGameTools::decrementAtRate(190, 500));
4648 SDL_Rect fullBox = SDL_Rect{ 0,0, ScreenWidth, ScreenHeight };
4649 SDL_RenderFillRect(Items::r1, &fullBox);
4652 //Character->renderTextureClip(
4653 //0, (float)yClip / 10 - 0.0945454545,
4654 //1.0 , 1.0);
4655 //FPS = 120;
4656 int transpar = 60;
4657 if (lOpen) {
4658 Items::gameGraphics.BoxMainBGL->renderTexture();
4659 double moreX = 0.0015;
4660 double slot = (((double)Items::gameGraphics.selTabs->box.w - (Graphics::prcnt(moreX, 'x', Items::w1))) / 5 * (tab - 1) / ScreenWidth);
4661 double selHeight = 0.894;
4662 double xOffSetHighlight = 0.01;
4663 Items::gameGraphics.selTabs->renderTexture(xOffSetHighlight, 0.0);
4664 if (tab == 1) { Items::gameGraphics.selHighlight->renderTexture(slot + xOffSetHighlight + moreX, selHeight ); }
4665 else if (tab == 2) { Items::gameGraphics.selHighlight->renderTexture(slot + xOffSetHighlight + moreX, selHeight ); }
4666 else if (tab == 3) { Items::gameGraphics.selHighlight->renderTexture(slot + xOffSetHighlight + moreX, selHeight ); }
4667 else if (tab == 4) { Items::gameGraphics.selHighlight->renderTexture(slot + xOffSetHighlight + moreX, selHeight ); }
4668 else if (tab == 5) { Items::gameGraphics.selHighlight->renderTexture(slot + xOffSetHighlight + moreX, selHeight); }
4669 if (hoverUDL)
4670 Items::gameGraphics.UDArrowL->renderTextureSizeFlip(
4671 Items::gameGraphics.UDArrowL->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
4672 Items::gameGraphics.UDArrowL->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
4673 Items::gameGraphics.UDArrowL->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
4674 Items::gameGraphics.UDArrowL->box.h + Graphics::prcnt(0.01, 'y', Items::w1),
4675 SDL_FLIP_VERTICAL);
4676 else
4677 Items::gameGraphics.UDArrowL->renderTextureFlip(SDL_FLIP_VERTICAL);
4679 if (hoverR)
4680 Items::gameGraphics.RArrow->renderTextureSize(
4681 Items::gameGraphics.RArrow->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
4682 Items::gameGraphics.RArrow->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
4683 Items::gameGraphics.RArrow->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
4684 Items::gameGraphics.RArrow->box.h + Graphics::prcnt(0.01, 'y', Items::w1)
4686 else
4687 Items::gameGraphics.RArrow->renderTexture();
4688 if (hoverL)
4689 Items::gameGraphics.RArrow->renderTextureSizeFlip(
4690 leftBox.x - Graphics::prcnt(0.005, 'x', Items::w1),
4691 leftBox.y - Graphics::prcnt(0.005, 'y', Items::w1),
4692 Items::gameGraphics.RArrow->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
4693 Items::gameGraphics.RArrow->box.h + Graphics::prcnt(0.01, 'y', Items::w1), SDL_FLIP_HORIZONTAL);
4694 else
4695 Items::gameGraphics.RArrow->renderTextureSizeFlip(leftBox.x, leftBox.y,
4696 Items::gameGraphics.RArrow->box.w, Items::gameGraphics.RArrow->box.h, SDL_FLIP_HORIZONTAL);
4698 if (tab == 1) {
4699 if (moSel)
4700 hoverSel1 = true;
4701 if (piSel)
4702 hoverSel2 = true;
4703 if (fiSel)
4704 hoverSel3 = true;
4706 if (hoverSel1) {
4707 Items::gameGraphics.BoxBGSel1->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4708 Items::gameGraphics.TextMouth->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4709 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4711 if (!moBuy) {
4712 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4713 SDL_RenderFillRect(Items::r1, &largeBoxSel1);
4714 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
4715 PriceWords->changeText(std::to_string(moPrice) + "p");
4716 if (hover) PriceWords->setTransparency(transpar);
4717 else PriceWords->setTransparency(255);
4718 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
4722 else {
4723 Items::gameGraphics.BoxBGSel1->renderTexture(0.05, 0.27);
4724 Items::gameGraphics.TextMouth->renderTexture();
4725 Items::gameGraphics.BoxOLSel->renderTexture();
4727 if (!moBuy) {
4728 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4729 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
4730 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));(largeBoxSel1.x, largeBoxSel1.y);
4731 PriceWords->changeText(std::to_string(moPrice) + "p");
4732 if (hover) PriceWords->setTransparency(transpar);
4733 else PriceWords->setTransparency(255);
4734 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
4737 #ifndef BETA
4738 if (hoverSel2) {
4739 Items::gameGraphics.BoxBGSel1->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4740 Items::gameGraphics.TextNipples->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4741 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4742 if (!niBuy) {
4743 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4744 SDL_RenderFillRect(Items::r1, &largeBoxSel2);
4745 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));(largeBoxSel2.x, largeBoxSel2.y);
4746 PriceWords->changeText(std::to_string(niPrice) + "p");
4747 if (hover) PriceWords->setTransparency(transpar);
4748 else PriceWords->setTransparency(255);
4749 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
4752 else {
4753 #endif
4754 Items::gameGraphics.BoxBGSel1->renderTexture(0.05, 0.47);
4755 Items::gameGraphics.TextNipples->renderTexture();
4756 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.47);
4757 #ifdef BETA
4758 Items::blockX->renderTexture(Items::gameGraphics.TextNipples->box);
4759 #endif
4761 #ifndef BETA
4762 if (!niBuy) {
4763 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4764 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
4765 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
4766 PriceWords->changeText(std::to_string(niPrice) + "p");
4767 if (hover) PriceWords->setTransparency(transpar);
4768 else PriceWords->setTransparency(255);
4769 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
4772 if (hoverSel3) {
4773 Items::gameGraphics.BoxBGSel1->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
4774 Items::gameGraphics.TextVagina->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
4775 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
4776 if (!fiBuy) {
4777 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4778 SDL_RenderFillRect(Items::r1, &largeBoxSel3);
4779 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
4780 PriceWords->changeText(std::to_string(fiPrice) + "p");
4781 if (hover) PriceWords->setTransparency(transpar);
4782 else PriceWords->setTransparency(255);
4783 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
4787 else {
4788 #endif
4789 Items::gameGraphics.BoxBGSel1->renderTexture(0.05, 0.67);
4790 Items::gameGraphics.TextVagina->renderTexture();
4791 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.67);
4792 #ifdef BETA
4793 Items::blockX->renderTexture(Items::gameGraphics.TextVagina->box);
4794 #endif
4795 #ifndef BETA
4796 if (!fiBuy) {
4797 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4798 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
4799 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
4800 PriceWords->changeText(std::to_string(fiPrice) + "p");
4801 if (hover) PriceWords->setTransparency(transpar);
4802 else PriceWords->setTransparency(255);
4803 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
4806 #endif
4807 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
4808 if (moSel)
4809 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
4810 if (piSel)
4811 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
4812 if (fiSel)
4813 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
4815 Tab1Words->renderTexture();
4818 if (tab == 2) {
4819 if (haSel)
4820 hoverSel1 = true;
4821 if (thSel)
4822 hoverSel2 = true;
4823 if (brSel)
4824 hoverSel3 = true;
4825 #ifndef BETA
4826 if (hoverSel1) {
4827 Items::gameGraphics.BoxBGSel2->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4828 Items::gameGraphics.TextHair->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4829 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4830 if (!haBuy) {
4831 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4832 SDL_RenderFillRect(Items::r1, &largeBoxSel1);
4833 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
4834 PriceWords->changeText(std::to_string(haPrice) + "p");
4835 if (hover) PriceWords->setTransparency(transpar);
4836 else PriceWords->setTransparency(255);
4837 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
4840 else {
4841 #endif
4842 Items::gameGraphics.BoxBGSel2->renderTexture(0.05, 0.27);
4843 Items::gameGraphics.TextHair->renderTexture();
4844 Items::gameGraphics.BoxOLSel->renderTexture();
4845 #ifdef BETA
4846 Items::blockX->renderTexture(Items::gameGraphics.TextHair->box);
4847 #endif
4848 #ifndef BETA
4849 if (!haBuy) {
4850 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4851 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
4852 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
4853 PriceWords->changeText(std::to_string(haPrice) + "p");
4854 if (hover) PriceWords->setTransparency(transpar);
4855 else PriceWords->setTransparency(255);
4856 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
4859 #endif
4860 if (hoverSel2) {
4861 Items::gameGraphics.BoxBGSel2->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4862 Items::gameGraphics.TextThigh->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4863 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4864 if (!thBuy) {
4865 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4866 SDL_RenderFillRect(Items::r1, &largeBoxSel2);
4867 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
4868 PriceWords->changeText(std::to_string(thPrice) + "p");
4869 if (hover) PriceWords->setTransparency(transpar);
4870 else PriceWords->setTransparency(255);
4871 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
4874 else {
4875 Items::gameGraphics.BoxBGSel2->renderTexture(0.05, 0.47);
4876 Items::gameGraphics.TextThigh->renderTexture();
4877 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.47);
4879 if (!thBuy) {
4880 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4881 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
4882 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
4883 PriceWords->changeText(std::to_string(thPrice) + "p");
4884 if (hover) PriceWords->setTransparency(transpar);
4885 else PriceWords->setTransparency(255);
4886 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
4890 if (hoverSel3) {
4891 Items::gameGraphics.BoxBGSel2->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
4892 Items::gameGraphics.TextBreast->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
4893 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
4894 if (!brBuy) {
4895 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4896 SDL_RenderFillRect(Items::r1, &largeBoxSel3);
4897 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
4898 PriceWords->changeText(std::to_string(brPrice) + "p");
4899 if (hover) PriceWords->setTransparency(transpar);
4900 else PriceWords->setTransparency(255);
4901 PriceWords->renderTexture( largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
4904 else {
4905 Items::gameGraphics.BoxBGSel2->renderTexture(0.05, 0.67);
4906 Items::gameGraphics.TextBreast->renderTexture();
4907 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.67);
4908 if (!brBuy) {
4909 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4910 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
4911 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
4912 PriceWords->changeText(std::to_string(brPrice) + "p");
4913 if (hover) PriceWords->setTransparency(transpar);
4914 else PriceWords->setTransparency(255);
4915 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
4918 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
4919 if (haSel)
4920 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
4921 if (thSel)
4922 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
4923 if (brSel)
4924 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
4925 Tab2Words->renderTexture();
4928 if (tab == 3) {
4930 if (maSel)
4931 hoverSel1 = true;
4932 if (feSel)
4933 hoverSel2 = true;
4934 if (xxSel)
4935 hoverSel3 = true;
4937 if (hoverSel1) {
4938 Items::gameGraphics.BoxBGSel3->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4939 Items::gameGraphics.TextMasturbation->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4940 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
4941 if (!maBuy) {
4942 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4943 SDL_RenderFillRect(Items::r1, &largeBoxSel1);
4944 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
4945 PriceWords->changeText(std::to_string(maPrice) + "p");
4946 if (hover) PriceWords->setTransparency(transpar);
4947 else PriceWords->setTransparency(255);
4948 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
4951 else {
4952 Items::gameGraphics.BoxBGSel3->renderTexture(0.05, 0.27);
4953 Items::gameGraphics.TextMasturbation->renderTexture();
4954 Items::gameGraphics.BoxOLSel->renderTexture();
4956 if (!maBuy) {
4957 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4958 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
4959 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
4960 PriceWords->changeText(std::to_string(maPrice) + "p");
4961 if (hover) PriceWords->setTransparency(transpar);
4962 else PriceWords->setTransparency(255);
4963 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
4966 #ifndef BETA
4967 if (hoverSel2) {
4968 Items::gameGraphics.BoxBGSel3->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4969 Items::gameGraphics.TextFellatio->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4970 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
4971 if (!feBuy) {
4972 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4973 SDL_RenderFillRect(Items::r1, &largeBoxSel2);
4974 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
4975 PriceWords->changeText(std::to_string(fePrice) + "p");
4976 if (hover) PriceWords->setTransparency(transpar);
4977 else PriceWords->setTransparency(255);
4978 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
4981 else {
4982 #endif
4983 Items::gameGraphics.BoxBGSel3->renderTexture(0.05, 0.47);
4984 Items::gameGraphics.TextFellatio->renderTexture();
4985 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.47);
4986 #ifdef BETA
4987 Items::blockX->renderTexture(Items::gameGraphics.TextFellatio->box);
4988 #endif
4989 #ifndef BETA
4990 if (!feBuy) {
4991 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
4992 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
4993 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
4994 PriceWords->changeText(std::to_string(fePrice) + "p");
4995 if (hover) PriceWords->setTransparency(transpar);
4996 else PriceWords->setTransparency(255);
4997 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
5000 #endif
5001 if (hoverSel3) {
5002 Items::gameGraphics.BoxBGSel3->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5003 Items::gameGraphics.TextXXX->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5004 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5005 if (!xxBuy) {
5006 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5007 SDL_RenderFillRect(Items::r1, &largeBoxSel3);
5008 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
5009 PriceWords->changeText(std::to_string(xxPrice) + "p");
5010 if (hover) PriceWords->setTransparency(transpar);
5011 else PriceWords->setTransparency(255);
5012 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
5015 else {
5017 Items::gameGraphics.BoxBGSel3->renderTexture(0.05, 0.67);
5018 Items::gameGraphics.TextXXX->renderTexture();
5019 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.67);
5020 if (!xxBuy) {
5021 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5022 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
5023 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
5024 PriceWords->changeText(std::to_string(xxPrice) + "p");
5025 if (hover) PriceWords->setTransparency(transpar);
5026 else PriceWords->setTransparency(255);
5027 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
5030 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
5031 if (maSel)
5032 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
5033 if (feSel)
5034 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
5035 if (xxSel)
5036 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
5037 Tab3Words->renderTexture();
5040 if (tab == 4) {
5041 if (blSel)
5042 hoverSel1 = true;
5043 if (tieSel)
5044 hoverSel2 = true;
5045 if (shirtSel)
5046 hoverSel3 = true;
5048 if (hoverSel1) {
5049 Items::gameGraphics.BoxBGSel4->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
5050 Items::gameGraphics.TextBlazer->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
5051 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
5052 if (!blBuy) {
5053 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5054 SDL_RenderFillRect(Items::r1, &largeBoxSel1);
5055 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
5056 PriceWords->changeText(std::to_string(blPrice) + "p");
5057 if (hover) PriceWords->setTransparency(transpar);
5058 else PriceWords->setTransparency(255);
5059 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
5062 else {
5063 Items::gameGraphics.BoxBGSel4->renderTexture(0.05, 0.27);
5064 Items::gameGraphics.TextBlazer->renderTexture();
5065 Items::gameGraphics.BoxOLSel->renderTexture();
5067 if (!blBuy) {
5068 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5069 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
5070 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
5071 PriceWords->changeText(std::to_string(blPrice) + "p");
5072 if (hover) PriceWords->setTransparency(transpar);
5073 else PriceWords->setTransparency(255);
5074 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
5077 if (hoverSel2) {
5079 Items::gameGraphics.BoxBGSel4->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
5080 Items::gameGraphics.TextTie->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
5081 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
5082 if (!tieBuy) {
5083 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5084 SDL_RenderFillRect(Items::r1, &largeBoxSel2);
5085 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
5086 PriceWords->changeText(std::to_string(tiePrice) + "p");
5087 if (hover) PriceWords->setTransparency(transpar);
5088 else PriceWords->setTransparency(255);
5089 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
5092 else {
5093 Items::gameGraphics.BoxBGSel4->renderTexture(0.05, 0.47);
5094 Items::gameGraphics.TextTie->renderTexture();
5095 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.47);
5097 if (!tieBuy) {
5098 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5099 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
5100 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
5101 PriceWords->changeText(std::to_string(tiePrice) + "p");
5102 if (hover) PriceWords->setTransparency(transpar);
5103 else PriceWords->setTransparency(255);
5104 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
5107 #ifndef BETA
5108 if (hoverSel3) {
5110 Items::gameGraphics.BoxBGSel4->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5111 Items::gameGraphics.TextShirt->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5112 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5114 if (!shirtBuy) {
5115 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5116 SDL_RenderFillRect(Items::r1, &largeBoxSel3);
5117 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
5118 PriceWords->changeText(std::to_string(shirtPrice) + "p");
5119 if (hover) PriceWords->setTransparency(transpar);
5120 else PriceWords->setTransparency(255);
5121 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
5124 else {
5125 #endif
5126 Items::gameGraphics.BoxBGSel4->renderTexture(0.05, 0.67);
5127 Items::gameGraphics.TextShirt->renderTexture();
5128 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.67);
5129 #ifdef BETA
5130 Items::blockX->renderTexture(Items::gameGraphics.TextShirt->box);
5131 #endif
5132 #ifndef BETA
5133 if (!shirtBuy) {
5134 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5135 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
5136 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
5137 PriceWords->changeText(std::to_string(shirtPrice) + "p");
5138 if (hover) PriceWords->setTransparency(transpar);
5139 else PriceWords->setTransparency(255);
5140 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
5143 #endif
5144 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
5145 if (blSel)
5146 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
5147 if (tieSel)
5148 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
5149 if (shirtSel)
5150 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
5152 Tab4Words->renderTexture();
5155 if (tab == 5) {
5156 if (skSel)
5157 hoverSel1 = true;
5158 if (paSel)
5159 hoverSel2 = true;
5160 if (thiSel)
5161 hoverSel3 = true;
5162 #ifndef BETA
5163 if (hoverSel1) {
5164 Items::gameGraphics.BoxBGSel5->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
5165 Items::gameGraphics.TextSkirt->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
5166 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel1.x, largeBoxSel1.y, largeBoxSel1.w, largeBoxSel1.h);
5167 if (!skBuy) {
5168 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5169 SDL_RenderFillRect(Items::r1, &largeBoxSel1);
5170 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
5171 PriceWords->renderWords(std::to_string(skPrice) + "p", largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
5174 else {
5175 #endif
5176 Items::gameGraphics.BoxBGSel5->renderTexture(0.05, 0.27);
5177 Items::gameGraphics.TextSkirt->renderTexture();
5178 Items::gameGraphics.BoxOLSel->renderTexture();
5179 #ifdef BETA
5180 Items::blockX->renderTexture(Items::gameGraphics.TextSkirt->box);
5181 #endif
5182 #ifndef BETA
5183 if (!skBuy) {
5184 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5185 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
5186 BuyWords->renderTexture(largeBoxSel1.x + bxOffset, largeBoxSel1.y + Graphics::prcnt(0.05, 'y', Items::w1));
5187 PriceWords->changeText(std::to_string(skPrice) + "p");
5188 if (hover) PriceWords->setTransparency(transpar);
5189 else PriceWords->setTransparency(255);
5190 PriceWords->renderTexture(largeBoxSel1.x + xOffSet, largeBoxSel1.y + Graphics::prcnt(0.09, 'y', Items::w1));
5193 if (hoverSel2) {
5194 Items::gameGraphics.BoxBGSel5->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
5195 Items::gameGraphics.TextPanties->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
5196 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel2.x, largeBoxSel2.y, largeBoxSel2.w, largeBoxSel2.h);
5197 if (!paBuy) {
5198 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5199 SDL_RenderFillRect(Items::r1, &largeBoxSel2);
5200 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
5201 PriceWords->changeText(std::to_string(skPrice) + "p");
5202 if (hover) PriceWords->setTransparency(transpar);
5203 else PriceWords->setTransparency(255);
5204 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
5207 else {
5208 #endif
5209 Items::gameGraphics.BoxBGSel5->renderTexture(0.05, 0.47);
5210 Items::gameGraphics.TextPanties->renderTexture();
5211 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.47);
5212 #ifdef BETA
5213 Items::blockX->renderTexture(Items::gameGraphics.TextPanties->box);
5214 #endif
5215 #ifndef BETA
5216 if (!paBuy) {
5217 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5218 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
5219 BuyWords->renderTexture(largeBoxSel2.x + bxOffset, largeBoxSel2.y + Graphics::prcnt(0.05, 'y', Items::w1));
5220 PriceWords->changeText(std::to_string(paPrice) + "p");
5221 if (hover) PriceWords->setTransparency(transpar);
5222 else PriceWords->setTransparency(255);
5223 PriceWords->renderTexture(largeBoxSel2.x + xOffSet, largeBoxSel2.y + Graphics::prcnt(0.09, 'y', Items::w1));
5226 if (hoverSel3) {
5227 Items::gameGraphics.BoxBGSel5->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5228 Items::gameGraphics.TextThighHigh->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5229 Items::gameGraphics.BoxOLSel->renderTextureSize(largeBoxSel3.x, largeBoxSel3.y, largeBoxSel3.w, largeBoxSel3.h);
5230 if (!thiBuy) {
5231 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5232 SDL_RenderFillRect(Items::r1, &largeBoxSel3);
5233 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
5234 PriceWords->changeText(std::to_string(thiPrice) + "p");
5235 if (hover) PriceWords->setTransparency(transpar);
5236 else PriceWords->setTransparency(255);
5237 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
5240 else {
5241 #endif
5242 Items::gameGraphics.BoxBGSel5->renderTexture(0.05, 0.67);
5243 Items::gameGraphics.TextThighHigh->renderTexture();
5244 Items::gameGraphics.BoxOLSel->renderTexture(0.05, 0.67);
5245 #ifdef BETA
5246 Items::blockX->renderTexture(Items::gameGraphics.TextThighHigh->box);
5247 #endif
5248 #ifndef BETA
5249 if (!thiBuy) {
5250 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 200);
5251 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
5252 BuyWords->renderTexture(largeBoxSel3.x + bxOffset, largeBoxSel3.y + Graphics::prcnt(0.05, 'y', Items::w1));
5253 PriceWords->changeText(std::to_string(thiPrice) + "p");
5254 if (hover) PriceWords->setTransparency(transpar);
5255 else PriceWords->setTransparency(255);
5256 PriceWords->renderTexture(largeBoxSel3.x + xOffSet, largeBoxSel3.y + Graphics::prcnt(0.09, 'y', Items::w1));
5259 #endif
5260 SDL_SetRenderDrawColor(Items::r1, 249, 211, 120, 125);
5261 if (skSel)
5262 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel1->box);
5263 if (paSel)
5264 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel2->box);
5265 if (thiSel)
5266 SDL_RenderFillRect(Items::r1, &Items::gameGraphics.BoxBGSel3->box);
5268 Tab5Words->renderTexture();
5271 else {
5272 //if (!hoverLeft)
5273 // BoxMainBGL->renderTextureClip(0, 0, 0.3168, 0.25, nonHoverAlpha - boxMod);
5274 //else
5275 // BoxMainBGL->renderTextureClip(0, 0, 0.3168, 0.25);
5277 if (hoverUDL)
5278 Items::gameGraphics.UDArrowL->renderTextureSize(
5279 Items::gameGraphics.UDArrowL->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5280 Items::gameGraphics.UDArrowL->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5281 Items::gameGraphics.UDArrowL->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5282 Items::gameGraphics.UDArrowL->box.h + Graphics::prcnt(0.01, 'y', Items::w1)
5284 else {
5285 if (!hoverLeft)
5286 Items::gameGraphics.UDArrowL->renderTextureTransparent(nonHoverAlphaL);
5287 else
5288 Items::gameGraphics.UDArrowL->renderTexture();
5292 if (rOpen) {
5293 Items::gameGraphics.BoxMainBGR->renderTexture();
5294 if (hoverUDR)
5295 Items::gameGraphics.UDArrowR->renderTextureSizeFlip(
5296 Items::gameGraphics.UDArrowR->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5297 Items::gameGraphics.UDArrowR->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5298 Items::gameGraphics.UDArrowR->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5299 Items::gameGraphics.UDArrowR->box.h + Graphics::prcnt(0.01, 'y', Items::w1),
5300 SDL_FLIP_VERTICAL);
5301 else
5302 Items::gameGraphics.UDArrowR->renderTextureFlip(SDL_FLIP_VERTICAL);
5304 int x = Items::gameGraphics.BoxBGV->box.x; int w = Items::gameGraphics.BoxBGV->box.w; int h = Items::gameGraphics.BoxBGV->box.h;
5305 int y1 = h + Items::gameGraphics.BoxBGV->box.y; int n = ((double)expCounter / 10000) * h;
5306 if ((double)expCounter / 10000 > 1.0) n = h;
5308 Items::gameGraphics.BoxBGV->renderTextureClip(x, y1 - n, 0, h - n, w, n);
5310 x = Items::gameGraphics.BoxBGH->box.x; w = Items::gameGraphics.BoxBGH->box.w; h = Items::gameGraphics.BoxBGH->box.h; int y2 = Items::gameGraphics.BoxBGH->box.y;
5311 n = ((double)awareCounter / 10000) * w;
5312 if ((double)awareCounter / 10000 > 1.0) n = w;
5314 Items::gameGraphics.BoxBGH->renderTextureClip(x, y2, 0, 0, n, h);
5316 Items::gameGraphics.BoxOLH->renderTexture();
5317 Items::gameGraphics.BoxOLV->renderTexture();
5319 if (hoverCHCl3) {
5320 Items::gameGraphics.BoxFullChloro->renderTextureSizeFlip(
5321 Items::gameGraphics.BoxFullChloro->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5322 Items::gameGraphics.BoxFullChloro->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5323 Items::gameGraphics.BoxFullChloro->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5324 Items::gameGraphics.BoxFullChloro->box.h + Graphics::prcnt(0.01, 'y', Items::w1),
5325 SDL_FLIP_VERTICAL);
5326 ChloroformWords->renderTextureSizeRotate(
5327 ChloroformWords->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5328 ChloroformWords->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5329 ChloroformWords->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5330 ChloroformWords->box.h + Graphics::prcnt(0.01, 'y', Items::w1),
5331 45);
5333 else {
5334 Items::gameGraphics.BoxFullChloro->renderTexture();
5335 ChloroformWords->renderTextureRotate(45);
5337 if (chloroClick) {
5338 SDL_Rect flash = {
5339 Items::gameGraphics.BoxFullChloro->box.x - Graphics::prcnt(0.01, 'x', Items::w1),
5340 Items::gameGraphics.BoxFullChloro->box.y - Graphics::prcnt(0.01, 'y', Items::w1),
5341 Items::gameGraphics.BoxFullChloro->box.w + Graphics::prcnt(0.02, 'x', Items::w1),
5342 Items::gameGraphics.BoxFullChloro->box.h + Graphics::prcnt(0.02, 'y', Items::w1)
5344 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
5345 bool cont = Items::gameGraphics.white->renderTextureFadeOut(300, flash);
5346 if (cont) {
5347 Items::gameGraphics.white->resetTimer();
5348 chloroClick = false;
5352 if (hoverInce) {
5353 Items::gameGraphics.BoxFullIncence->renderTextureSizeFlip(
5354 Items::gameGraphics.BoxFullIncence->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5355 Items::gameGraphics.BoxFullIncence->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5356 Items::gameGraphics.BoxFullIncence->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5357 Items::gameGraphics.BoxFullIncence->box.h + Graphics::prcnt(0.01, 'y', Items::w1),
5358 SDL_FLIP_VERTICAL);
5359 Incenence->renderTextureSizeRotate(
5360 Incenence->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5361 Incenence->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5362 Incenence->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5363 Incenence->box.h + Graphics::prcnt(0.01, 'y', Items::w1),
5364 45);
5366 else {
5367 Items::gameGraphics.BoxFullIncence->renderTexture();
5368 Incenence->renderTextureRotate(45);
5371 if (inceClick) {
5372 SDL_Rect flash = {
5373 Items::gameGraphics.BoxFullIncence->box.x - Graphics::prcnt(0.01, 'x', Items::w1),
5374 Items::gameGraphics.BoxFullIncence->box.y - Graphics::prcnt(0.01, 'y', Items::w1),
5375 Items::gameGraphics.BoxFullIncence->box.w + Graphics::prcnt(0.02, 'x', Items::w1),
5376 Items::gameGraphics.BoxFullIncence->box.h + Graphics::prcnt(0.02, 'y', Items::w1)
5378 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
5379 bool cont = Items::gameGraphics.white->renderTextureFadeOut(300, flash);
5380 if (cont) {
5381 Items::gameGraphics.white->resetTimer();
5382 inceClick = false;
5386 ChloroformTipWords->renderTexture();
5387 IncenceTipWords->renderTexture();
5389 ExperienceWords->renderTextureRotate(90);
5390 AwarenessWords->renderTexture();
5392 PointsWords->renderTexture();
5396 else {
5397 /*if(!hoverRight)
5398 BoxMainBGR->renderTextureClip(0.0, 0.0, 1.0, 0.25, nonHoverAlpha - boxMod);
5399 else
5400 BoxMainBGR->renderTextureClip(0.0, 0.0, 1.0, 0.25);*/
5401 if (hoverUDR)
5402 Items::gameGraphics.UDArrowR->renderTextureSize(
5403 Items::gameGraphics.UDArrowR->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5404 Items::gameGraphics.UDArrowR->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5405 Items::gameGraphics.UDArrowR->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5406 Items::gameGraphics.UDArrowR->box.h + Graphics::prcnt(0.01, 'y', Items::w1)
5408 else {
5409 if (!hoverRight)
5410 Items::gameGraphics.UDArrowR->renderTextureTransparent(nonHoverAlphaR);
5411 else
5412 Items::gameGraphics.UDArrowR->renderTexture();
5417 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxBGSel1->box, x, y) && lOpen) {
5418 hoverSel1 = true;
5419 hover = true;
5421 else hoverSel1 = false;
5422 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxBGSel2->box, x, y) && lOpen) {
5423 hoverSel2 = true;
5424 hover = true;
5426 else hoverSel2 = false;
5427 if (GenericGameTools::checkRectHitBox(Items::gameGraphics.BoxBGSel3->box, x, y) && lOpen) {
5428 hoverSel3 = true;
5429 hover = true;
5431 else hoverSel3 = false;
5433 if (!hoverSel1 && !hoverSel2 && !hoverSel3 && start)
5434 ScrollTip->renderTextureFadeOut(7000);
5436 if (hoverCHCl3)
5437 ChTip->renderTexture();
5438 else if (hoverInce)
5439 IncTip->renderTexture();
5440 else if (tab == 1) {
5441 if (hoverSel1)
5442 moTip->renderTexture();
5443 else if (hoverSel2)
5444 niTip->renderTexture();
5445 else if (hoverSel3)
5446 fiTip->renderTexture();
5448 else if (tab == 2) {
5449 if (hoverSel1)
5450 haTip->renderTexture();
5451 else if (hoverSel2)
5452 thTip->renderTexture();
5453 else if (hoverSel3)
5454 brTip->renderTexture();
5456 else if (tab == 3) {
5457 if (hoverSel1)
5458 maTip->renderTexture();
5459 else if (hoverSel2)
5460 feTip->renderTexture();
5461 else if (hoverSel3)
5462 xxTip->renderTexture();
5464 else if (tab == 4) {
5465 if (hoverSel1)
5466 blTip->renderTexture();
5467 else if (hoverSel2)
5468 toTip->renderTexture();
5469 else if (hoverSel3)
5470 skTip->renderTexture();
5472 else if (tab == 5) {
5473 if (hoverSel1)
5474 braTip->renderTexture();
5475 else if (hoverSel2)
5476 paTip->renderTexture();
5477 else if (hoverSel3)
5478 thhTip->renderTexture();
5481 if (!hoverRight && !rOpen)
5482 Items::gameGraphics.StatsLogo->renderTextureTransparent(nonHoverAlphaR);
5483 else
5484 Items::gameGraphics.StatsLogo->renderTexture();
5486 if (!hoverLeft && !lOpen)
5487 Items::gameGraphics.ToolsLogo->renderTextureTransparent(nonHoverAlphaL);
5488 else
5489 Items::gameGraphics.ToolsLogo->renderTexture();
5492 #ifdef HBOX
5493 SDL_SetRenderDrawColor(Items::r1, 255, 255, 255, 150);
5494 SDL_RenderFillRect(Items::r1, &head);
5495 SDL_RenderFillRect(Items::r1, &lArm);
5496 SDL_RenderFillRect(Items::r1, &rArm);
5497 SDL_RenderFillRect(Items::r1, &torso);
5498 SDL_RenderFillRect(Items::r1, &pelvis);
5499 SDL_RenderFillRect(Items::r1, &lLeg);
5500 SDL_RenderFillRect(Items::r1, &rLeg);
5501 #endif
5502 if (time - eyeOpenStart > eyeOpenTime) {
5503 std::vector <Words*> failMsg = { new Words(58,0,"Game Over. Retry ?", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
5504 new Words(60,0," Yes", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1),
5505 new Words(60,0," No", SDL_Color{ 0,0,10,255 }, Items::r1, Items::w1) };
5506 Items::animationLibrary.idleAni->currentPosition = 0;
5507 bool choice = Prompts::runPrompt(failMsg);
5508 Items::animationLibrary.eyesAni->done = false;
5509 openEyes = false;
5510 time = 0;
5511 eyeOpenStart = 0;
5512 if (choice == false) {
5513 screenRunning = false;
5514 Items::gameState = 1;
5516 else {
5517 //Items::gameState = -1;
5518 reset();
5522 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 255);
5523 SDL_RenderPresent(Items::r1);
5526 void close() {
5527 Mix_HaltChannel(-1);
5528 awareCounter = 0;
5529 expCounter = 0;
5530 expPoints = 0;
5532 //Items::screen = -1;
5534 Items::animationLibrary.pokeFake->clearFrames();
5535 Items::animationLibrary.handFake->clearFrames();
5537 for each(Texture* fr in Items::animationLibrary.eyesAni->frames) {
5538 fr->box.w /= 1.044660194174757;
5539 fr->box.h /= 1.044660194174757;
5541 for each(Texture* fr in Items::animationLibrary.felAni->frames) {
5542 fr->box.w /= 1.070;
5543 fr->box.h /= 1.070;
5545 for each(Texture* fr in Items::animationLibrary.masAni->frames) {
5546 fr->box.w /= 1.070;
5547 fr->box.h /= 1.070;
5549 for each(Texture* fr in Items::animationLibrary.noBreAni->frames) {
5550 fr->box.w /= 1.044660194174757;
5551 fr->box.h /= 1.044660194174757;
5553 for each(Texture* fr in Items::animationLibrary.breAni->frames) {
5554 fr->box.w /= 1.044660194174757;
5555 fr->box.h /= 1.044660194174757;
5557 for each(Texture* fr in Items::animationLibrary.thiAni->frames) {
5558 fr->box.w /= 1.070;
5559 fr->box.h /= 1.070;
5561 for each(Texture* fr in Items::animationLibrary.idleAni->frames) {
5562 fr->box.w /= 1.084660194174757;
5563 fr->box.h /= 1.084660194174757;
5565 for each(Texture* fr in Items::animationLibrary.moAni->frames) {
5566 fr->box.w /= 1.0;
5567 fr->box.h /= 0.99;
5569 for each(Texture* fr in Items::animationLibrary.haAni->frames) {
5570 fr->box.w /= 1.070;
5571 fr->box.h /= 1.070;
5573 for each(Texture* fr in Items::animationLibrary.lPiAni->frames) {
5574 fr->box.w /= 1.070;
5575 fr->box.h /= 1.070;
5577 for each(Texture* fr in Items::animationLibrary.rPiAni->frames) {
5578 fr->box.w /= 1.0700;
5579 fr->box.h /= 1.0700;
5581 for each(Texture* fr in Items::animationLibrary.fiAni->frames) {
5582 fr->box.w /= 1.070;
5583 fr->box.h /= 1.070;
5586 Items::screen = -1;
5587 if (Items::gameState == 1) {
5588 Items::gameGraphics.clearLibrary();
5589 //Items::animationLibrary.clearLibrary();
5590 Items::menuGraphics = MenuGraphics::loadMenuGraphics();
5591 Items::menuGraphics.configureLibrary(Items::r1, Items::w1);
5592 SubMenu::setPlotElements();
5593 Items::textureDelivery = &Plot::badTextureSet;
5594 Items::textDelivery = &Text::badPlotText;
5595 Items::locationsDelivery = &Plot::badLocations;
5596 Items::operationsDelivery = &Plot::badOperations;
5597 Items::screen = 10;
5599 else if(Items::gameState == -1){
5601 Items::gameGraphics.clearLibrary();
5605 ///START FINAL ANIMATIONS HERE
5608 //Items::animationLibrary.clearLibrary();
5609 Items::menuGraphics = MenuGraphics::loadMenuGraphics();
5610 Items::menuGraphics.configureLibrary(Items::r1, Items::w1);
5611 SubMenu::setPlotElements();
5612 Items::textureDelivery = &Plot::goodTextureSet;
5613 Items::textDelivery = &Text::goodPlotText;
5614 Items::locationsDelivery = &Plot::goodLocations;
5615 Items::operationsDelivery = &Plot::goodOperations;
5616 Items::screen = 10;
5618 Mix_FadeOutMusic(100);
5622 namespace OpeningSequence
5624 void runSequence();
5625 void loadProfile();
5627 void gameLoop();
5629 void processInput();
5630 void update();
5631 void play();
5632 void render();
5633 void close();
5635 bool endTransitionFlag;
5636 bool langClicked, langPlayed;
5637 bool logo1Flag;
5638 bool logo2Flag;
5639 bool screenRunning;
5640 bool skippedFlag;
5642 bool hoverEN;
5643 bool hoverJP;
5645 const int FPS = 30;
5647 double fadeRate;
5648 DATATYPE_MILLISECONDS systemTime;
5650 int alpha;
5651 int x;
5652 int y;
5654 int elapsed = -1;
5656 //decay for flags
5657 int langTime = 2000;
5659 //stay for l1 || in for l2
5660 int logo1Time = 6500;
5662 //decay for l1
5663 int logo2TransitionTime = 10000;
5665 //stay for l2
5666 int logo2Time = 11500;
5668 //decay for l2
5669 int endTransitionTime = 12120;
5671 long long initial = 0;
5672 long long expired = 0;
5673 long long start = 0;
5674 long long timer = 0;
5676 #ifdef MULTILANG
5677 Texture* engSymbol;
5678 Texture* jpSymbol;
5679 #endif
5680 Texture* logoEC;
5681 Texture* logo2;
5682 Texture* startMenu;
5683 Texture* white;
5685 Words* hs;
5686 Words* hsRole;
5688 bool bgmPlay;
5689 bool effectDone;
5690 void chanDone(int chan) {
5691 effectDone = true;
5694 void OpeningSequence::runSequence()
5696 alpha = 0;
5698 #ifdef MULTILANG
5699 OpeningSequence::engSymbol = new Texture(0.10, 0.33, "Graphics/Icons/EN.png", Items::r1, Items::w1);
5700 OpeningSequence::jpSymbol = new Texture(0.55, 0.33, "Graphics/Icons/JP.png", Items::r1, Items::w1);
5701 #endif
5702 //float a = 0;
5703 //float b = 0;
5704 //a = SDL_GetTicks();
5708 //b = (SDL_GetTicks() - a);
5709 //float c = 1.0 / 30 * 1000;
5710 //std::cout << b << " millisenconds with " + std::to_string(c) << " seconds per frames\n\n";
5712 systemTime = SYSTEM_MILLISECONDS;
5713 #if defined ENGLISH
5714 hoverEN = false;
5715 Items::engFlag = true;
5716 langClicked = true;
5718 alpha = 0;
5719 start = systemTime.count();
5720 #endif // ENGLISH
5721 gameLoop();
5724 void OpeningSequence::gameLoop() {
5725 screenRunning = true;
5726 initial = 0;
5727 expired = 0;
5729 while (screenRunning) {
5730 initial = systemTime.count();
5731 systemTime = SYSTEM_MILLISECONDS;
5732 processInput();
5733 update();
5734 play();
5735 render();
5737 GenericGameTools::stallGame(&initial, &expired, (int)(1.0 / FPS * 1000));
5740 close();
5743 void OpeningSequence::processInput() {
5744 Items::inputs = Items::mio->processKBMInput(&x, &y);
5746 if (Items::inputs->at(QUIT)) {
5747 screenRunning = false;
5748 Items::screen = -1;
5752 void OpeningSequence::update() {
5754 hoverEN = false;
5755 hoverJP = false;
5756 if (langClicked) {
5757 if (LCLICK) {
5758 //decay for flags
5759 langTime = 500;
5761 //stay for l1 || in for l2
5762 logo1Time = 1000;
5764 //decay for l1
5765 logo2TransitionTime = 1500;
5767 //stay for l2
5768 logo2Time = 2000;
5770 //decay for l2
5771 endTransitionTime = 2500;
5774 #if defined MULTILANG
5775 if (GenericGameTools::checkRectHitBox(engSymbol->box, x, y) && !langClicked) {
5776 hoverEN = true;
5777 if (LCLICK) {
5779 engSymbol->box.x = engSymbol->box.x - Graphics::prcnt(0.005, 'x', Items::w1);
5780 engSymbol->box.y = engSymbol->box.y - Graphics::prcnt(0.005, 'y', Items::w1);
5781 engSymbol->box.w = engSymbol->box.w + Graphics::prcnt(0.01, 'x', Items::w1);
5782 engSymbol->box.h = engSymbol->box.h + Graphics::prcnt(0.01, 'y', Items::w1);
5784 hoverEN = false;
5785 Items::engFlag = true;
5786 langClicked = true;
5788 alpha = 0;
5789 start = systemTime.count();
5792 #ifndef DEMO
5793 else if (GenericGameTools::checkRectHitBox(jpSymbol->box, x, y) && !langClicked) {
5794 hoverJP = true;
5795 if (LCLICK) {
5797 jpSymbol->box.x = jpSymbol->box.x - Graphics::prcnt(0.005, 'x', Items::w1);
5798 jpSymbol->box.y = jpSymbol->box.y - Graphics::prcnt(0.005, 'y', Items::w1);
5799 jpSymbol->box.w = jpSymbol->box.w + Graphics::prcnt(0.01, 'x', Items::w1);
5800 jpSymbol->box.h = jpSymbol->box.h + Graphics::prcnt(0.01, 'y', Items::w1);
5802 hoverJP = false;
5803 Items::engFlag = false;
5804 langClicked = true;
5806 alpha = 0;
5807 start = systemTime.count();
5810 #endif
5811 #endif
5812 if (langClicked) {
5813 timer = systemTime.count();
5814 elapsed = timer - start;
5815 //std::cout << elapsed << "\n";
5818 if (skippedFlag) {
5819 screenRunning = false;
5821 //else if (elapsed < langTime && elapsed > -1) {
5822 // std::cout << "AAA\n";
5824 //else if (elapsed < logo1Time && elapsed > -1) {
5825 // std::cout << "BBB\n";
5827 //else if (elapsed < logo2Time && elapsed > -1) {
5828 // std::cout << "CCC\n";
5830 //else if (elapsed < endTransitionTime && elapsed > -1) {
5831 // std::cout << "DDD\n";
5833 else if (elapsed > endTransitionTime && effectDone) {
5834 screenRunning = false;
5835 Items::screen = 1;
5836 // std::cout << "EEE\n";
5839 int vol = 128;
5840 void OpeningSequence::play() {
5841 Mix_VolumeMusic(MIX_MAX_VOLUME / 3);
5842 Mix_ChannelFinished(chanDone);
5843 if (langClicked && langPlayed && LCLICK && !bgmPlay) {
5844 bgmPlay = true;
5845 Mix_FadeOutChannel(0, 500);
5846 Items::bgmLibrary.Track1->playFadeIn(-1, 500);
5848 //if (bgmPlay && vol != 0) {
5849 // vol -= 2;
5850 // Mix_VolumeChunk(Items::bgmLibrary.StartSFX, vol--);
5853 if (!bgmPlay && elapsed > logo1Time) {
5854 bgmPlay = true;
5855 Items::bgmLibrary.Track1->play();
5858 if (langClicked && !langPlayed) {
5859 langPlayed = true;
5860 Items::openingItems.StartSFX->playSFX();
5863 void OpeningSequence::render() {
5864 SDL_RenderClear(Items::r1);
5866 if (elapsed == -1) {
5867 #ifdef MULTILANG
5868 if (hoverEN) {
5869 engSymbol->renderTextureSize(
5870 engSymbol->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5871 engSymbol->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5872 engSymbol->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5873 engSymbol->box.h + Graphics::prcnt(0.01, 'y', Items::w1));
5875 else {
5876 engSy0mbol->renderTexture();
5878 #ifdef DEMO
5879 jpSymbol->renderTexture();
5880 Items::blockX->renderTexture(jpSymbol->box);
5881 #endif // !DEMO
5882 #ifndef DEMO
5883 if (hoverJP) {
5884 jpSymbol->renderTextureSize(
5885 jpSymbol->box.x - Graphics::prcnt(0.005, 'x', Items::w1),
5886 jpSymbol->box.y - Graphics::prcnt(0.005, 'y', Items::w1),
5887 jpSymbol->box.w + Graphics::prcnt(0.01, 'x', Items::w1),
5888 jpSymbol->box.h + Graphics::prcnt(0.01, 'y', Items::w1));
5890 else {
5891 jpSymbol->renderTexture();
5893 #endif
5894 #endif
5897 else if (elapsed + 65< langTime && elapsed > -1) {
5898 //std::cout << "111\n";
5899 #ifdef MULTILANG
5900 engSymbol->renderTextureFadeOut(langTime);
5901 jpSymbol->renderTextureFadeOut(langTime);
5902 #endif
5903 alpha = GenericGameTools::decrementAtRate(255, langTime - 100);
5904 SDL_SetRenderDrawBlendMode(Items::r1, SDL_BLENDMODE_BLEND);
5905 #ifdef MULTILANG
5906 if (Items::engFlag) {
5907 SDL_RenderFillRect(Items::r1, &engSymbol->box);
5909 else {
5910 SDL_RenderFillRect(Items::r1, &jpSymbol->box);
5912 #endif
5913 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, alpha);
5914 Items::openingItems.logoEC->renderTexture();
5915 SDL_RenderFillRect(Items::r1, NULL);
5918 else if (elapsed < logo1Time && elapsed > -1) {
5919 //std::cout << "222\n";
5920 #ifdef MULTILANG
5921 engSymbol->clearTexture();
5922 jpSymbol->clearTexture();
5923 #endif
5924 //fadeout slow
5925 if (elapsed > (langTime + 2500))
5926 Items::openingItems.logoEC->renderTextureFadeOut(logo1Time - langTime - 2500);
5927 else
5928 Items::openingItems.logoEC->renderTexture();
5930 Items::openingItems.white->renderTextureFadeOut(3000);
5932 SDL_SetRenderDrawColor(Items::r1, 0, 0, 0, 0);
5934 else if (elapsed < logo2TransitionTime && elapsed > -1) {
5935 //std::cout << "333\n";
5937 //fadein
5938 Items::openingItems.logo2->renderTextureFadeIn(logo2TransitionTime - logo1Time);
5939 hs->renderTextureFadeIn(logo2TransitionTime - logo1Time);
5940 hsRole->renderTextureFadeIn(logo2TransitionTime - logo1Time);
5942 else if (elapsed < logo2Time && elapsed > -1) {
5943 //std::cout << "444\n";
5945 //fade out slow
5946 Items::openingItems.logo2->renderTextureFadeOut(logo2Time - logo2TransitionTime);
5947 hs->renderTextureFadeOut(logo2Time - logo2TransitionTime);
5948 hsRole->renderTextureFadeOut(logo2Time - logo2TransitionTime);
5950 else {//if (elapsed < endTransitionTime && elapsed > -1) {
5951 //std::cout << "555\n";
5952 //fadein
5953 //startMenu->renderTextureFadeIn(endTransitionTime - logo2TransitionTime);
5955 //else if (elapsed > endTransitionTime && elapsed > -1) {
5956 // std::cout << "666\n";
5957 // //fadeOut
5960 SDL_RenderPresent(Items::r1);
5962 void loadProfile() {
5963 #ifdef RELEASE
5964 SaveData::loadProfile(&Items::userData);
5965 #endif
5966 #ifdef DEMO
5967 Items::userData = SaveData();
5968 #endif // !Demo
5969 #ifdef UNLOCK
5970 Items::userData = SaveData('u');
5971 #endif
5973 void OpeningSequence::close() {
5974 hs->clearWords();
5975 hsRole->clearWords();
5976 Items::openingItems.clearLibrary();
5977 loadProfile();
5981 namespace LoadSequence {
5982 void loadText() {
5983 std::ifstream gameWordFile;
5984 std::ifstream menuWordFile;
5985 std::ifstream tipFile;
5986 std::ifstream promptFile;
5987 std::ifstream extraFile;
5988 std::ifstream PlotFile;
5989 std::ifstream hPlotFile;
5990 std::ifstream tPlotFile;
5992 std::ifstream goodEndFile;
5993 std::ifstream regEndFile;
5994 std::ifstream badEndFile;
5995 if (Items::engFlag) {
5996 extraFile.open("data/text/eEng.txt");
5997 gameWordFile.open("data/text/gEng.txt");
5998 hPlotFile.open("data/text/hPlotEng.txt");
5999 menuWordFile.open("data/text/mEng.txt");
6000 promptFile.open("data/text/pEng.txt");
6001 PlotFile.open("data/text/PlotEng.txt");
6002 tPlotFile.open("data/text/tPlotEng.txt");
6003 tipFile.open("data/text/ttipEng.txt");
6005 badEndFile.open("data/text/badplot.txt");
6006 regEndFile.open("data/text/mehplot.txt");
6007 #ifdef BETA
6008 goodEndFile.open("data/text/falseGoodPlot.txt");
6009 #endif
6010 #ifndef BETA
6011 goodEndFile.open("data/text/goodplot.txt");
6012 #endif
6015 else {
6016 extraFile.open("data/text/eJp.txt");
6017 gameWordFile.open("data/text/gJp.txt");
6018 hPlotFile.open("data/text/hPlotJp.txt");
6019 menuWordFile.open("data/text/mJp.txt");
6020 promptFile.open("data/text/pJp.txt");
6021 PlotFile.open("data/text/PlotJp.txt");
6022 tPlotFile.open("data/text/tPlotJp.txt");
6023 tipFile.open("data/text/ttipJp.txt");
6025 std::string line;
6026 while (std::getline(gameWordFile, line))
6027 Text::GameText.push_back(line);
6028 while (std::getline(menuWordFile, line))
6029 Text::MenuText.push_back(line);
6030 while (std::getline(tipFile, line))
6031 Text::TipText.push_back(line);
6032 while (std::getline(promptFile, line))
6033 Text::PromptText.push_back(line);
6034 while (std::getline(PlotFile, line))
6035 Text::PlotText.push_back(line);
6036 while (std::getline(extraFile, line))
6037 Text::extraText.push_back(line);
6038 while (std::getline(hPlotFile, line))
6039 Text::hardPlotText.push_back(line);
6040 while (std::getline(tPlotFile, line))
6041 Text::timePlotText.push_back(line);
6042 while (std::getline(badEndFile, line))
6043 Text::badPlotText.push_back(line);
6044 while (std::getline(regEndFile, line))
6045 Text::regPlotText.push_back(line);
6046 while (std::getline(goodEndFile, line))
6047 Text::goodPlotText.push_back(line);
6049 std::vector<std::string> badPlotText;
6050 std::vector<std::string> regPlotText;
6051 std::vector<std::string> goodPlotText;
6053 float tabwordX = 0.070;
6054 float tabwordY = 0.84;
6056 double tipX = 0.3175, tipY = 0.95;
6057 double tipFont = 40;
6058 double pendulumTopX = 0.52, pendulumTopY = 0.07;
6059 double selectionFont = 74;
6061 SDL_Color tipCol = { 75,75, 75,255 };
6063 int itemFont = 90;
6064 int itemFontClass = 0;
6066 Text::backWords = new Words(selectionFont, 0, Text::MenuText.at(5), 0, 0, Items::r1, Items::w1);
6067 Menu::PlayWords = new Words(itemFont, itemFontClass, Text::MenuText.at(0), SDL_Color{ 0,0,0,255 }, 0.17, 0.37, Items::r1, Items::w1);
6068 //Menu::PlayWords->createOutline(SDL_Color{ 255,0,0,255 });
6070 SubMenu::freeWords = new Words(selectionFont, 0, Text::MenuText.at(1), 0.05, 0.05, Items::r1, Items::w1);
6071 SubMenu::freeTip = new Words(tipFont, 0, Text::TipText.at(19), tipCol, pendulumTopX, pendulumTopY, Items::r1, Items::w1);
6072 SubMenu::regularWords = new Words(selectionFont, 0, Text::MenuText.at(2), 0.05, 0.15, Items::r1, Items::w1);
6073 SubMenu::regularTip = new Words(tipFont, 0, Text::TipText.at(20), tipCol, pendulumTopX, pendulumTopY + 0.1, Items::r1, Items::w1);
6074 SubMenu::timeWords = new Words(selectionFont, 0, Text::MenuText.at(3), 0.05, 0.25, Items::r1, Items::w1);
6075 SubMenu::timeTip = new Words(tipFont, 0, Text::TipText.at(21), tipCol, pendulumTopX, pendulumTopY + 0.2, Items::r1, Items::w1);
6076 SubMenu::hardWords = new Words(selectionFont, 0, Text::MenuText.at(4), 0.05, 0.35, Items::r1, Items::w1);
6077 SubMenu::hardTip = new Words(tipFont, 0, Text::TipText.at(22), tipCol, pendulumTopX - 0.05, pendulumTopY + 0.3, Items::r1, Items::w1);
6079 Menu::ExtraWords = new Words(itemFont, itemFontClass, Text::MenuText.at(6), 0.42, 0.49, Items::r1, Items::w1);
6081 double lAlign = 0.07;
6082 double vectAlign = 0.28, vectSpace = 0.125, start = 0.3;
6083 float chloroX = 0.76;
6084 float chloroY = 0.80;
6085 float inceX = 0.88;
6086 float inceY = 0.80;
6088 SDL_Color white = { 255,255,255,255 };
6089 SDL_Color woodColor = { 245,245,220,255 };
6091 ExtraMenu::nameWords = new Words(80, 0, Text::extraText.at(0), woodColor, lAlign - 0.0025, 0.0300, Items::r1, Items::w1);
6092 ExtraMenu::statusWords = new Words(50, 0, Text::extraText.at(1), woodColor, lAlign, 0.10, Items::r1, Items::w1);
6093 int i = 0;
6094 ExtraMenu::trackWords = { new Words(70, 0, Text::extraText.at(2),white, vectAlign, start + vectSpace * i++,Items::r1, Items::w1),
6095 new Words(70, 0, Text::extraText.at(3),white, vectAlign, start + vectSpace * i++,Items::r1, Items::w1) ,
6096 new Words(70, 0, Text::extraText.at(4),white, vectAlign, start + vectSpace * i++,Items::r1, Items::w1),
6097 new Words(70, 0, Text::extraText.at(18),white, vectAlign, start + vectSpace * i++,Items::r1, Items::w1) };
6098 i = 0;
6099 ExtraMenu::imageWords = { new Words(70, 0, Text::extraText.at(9), white,vectAlign, start + vectSpace * i++,Items::r1, Items::w1),
6100 new Words(70, 0, Text::extraText.at(10),white, vectAlign, start + vectSpace * i++,Items::r1, Items::w1) ,
6101 new Words(70, 0, Text::extraText.at(11), white,vectAlign, start + vectSpace * i++,Items::r1, Items::w1),
6102 new Words(70, 0, Text::extraText.at(12), white,vectAlign, start + vectSpace * i++,Items::r1, Items::w1) };
6103 ExtraMenu::link1Words = new Words(85, 0, Text::extraText.at(5), woodColor, lAlign, 0.875, Items::r1, Items::w1);
6104 ExtraMenu::link2Words = new Words(85, 0, Text::extraText.at(15), woodColor, 0.78, 0.875, Items::r1, Items::w1);
6105 ExtraMenu::backWords = new Words(selectionFont, 0, Text::MenuText.at(5), woodColor, 0, 0, Items::r1, Items::w1);
6106 ExtraMenu::nextWords = new Words(60, 0, Text::extraText.at(16), woodColor, 0.83, 0.02, Items::r1, Items::w1);
6108 Menu::QuitWords = new Words(itemFont, itemFontClass, Text::MenuText.at(7), 0.17, 0.62, Items::r1, Items::w1);
6110 SDL_Color defaultColor = SDL_Color{ 200,200,200,255 };
6111 DefaultGame::Tab1Words = new Words(48, 0, Text::GameText.at(Text::Fingers), defaultColor, tabwordX, tabwordY, Items::r1, Items::w1);
6112 DefaultGame::Tab2Words = new Words(48, 0, Text::GameText.at(Text::Hands), defaultColor, tabwordX, tabwordY, Items::r1, Items::w1);
6113 DefaultGame::Tab3Words = new Words(48, 0, Text::GameText.at(Text::Penis), defaultColor, tabwordX, tabwordY, Items::r1, Items::w1);
6114 DefaultGame::Tab4Words = new Words(48, 0, Text::GameText.at(Text::Outer), defaultColor, tabwordX+0.005f, tabwordY, Items::r1, Items::w1);
6115 DefaultGame::Tab5Words = new Words(48, 0, Text::GameText.at(Text::Inner), defaultColor, tabwordX, tabwordY, Items::r1, Items::w1);
6117 DefaultGame::ExperienceWords = new Words(52, 1, Text::GameText.at(Text::Experience), defaultColor, 0.7395, 0.395, Items::r1, Items::w1);
6119 DefaultGame::AwarenessWords = new Words(36, 1, Text::GameText.at(Text::Awareness), defaultColor, 0.78, 0.69, Items::r1, Items::w1);
6120 DefaultGame::PointsWords = new Words(48, 2, "err", defaultColor, 0.905, 0.62, Items::r1, Items::w1);
6121 DefaultGame::ChloroformWords = new Words(36, 1, Text::GameText.at(Text::CHCl3), chloroX - 0.0045, chloroY + 0.0265, Items::r1, Items::w1);
6122 DefaultGame::ChloroformTipWords = new Words(26, 0, Text::GameText.at(Text::CHCl3Tip), defaultColor, chloroX - 0.003, chloroY + 0.11, Items::r1, Items::w1);
6123 DefaultGame::Incenence = new Words(32, 1, Text::GameText.at(Text::Incence), inceX - 0.005550, inceY + 0.0315, Items::r1, Items::w1);
6124 DefaultGame::IncenceTipWords = new Words(26, 0, Text::GameText.at(Text::IncenceTip), defaultColor, inceX - 0.009, inceY + 0.11, Items::r1, Items::w1);
6126 DefaultGame::moTip = new Words(36, 0, Text::TipText.at(Text::Mo),defaultColor, tipX, tipY, Items::r1, Items::w1);
6127 DefaultGame::niTip = new Words(36, 0, Text::TipText.at(Text::Ni),defaultColor, tipX, tipY, Items::r1, Items::w1);
6128 DefaultGame::fiTip = new Words(36, 0, Text::TipText.at(Text::Fi),defaultColor, tipX, tipY, Items::r1, Items::w1);
6129 DefaultGame::haTip = new Words(36, 0, Text::TipText.at(Text::Ha),defaultColor, tipX, tipY, Items::r1, Items::w1);
6130 DefaultGame::thTip = new Words(36, 0, Text::TipText.at(Text::Th),defaultColor, tipX, tipY, Items::r1, Items::w1);
6131 DefaultGame::brTip = new Words(36, 0, Text::TipText.at(Text::Br),defaultColor, tipX, tipY, Items::r1, Items::w1);
6132 DefaultGame::maTip = new Words(36, 0, Text::TipText.at(Text::Ma),defaultColor, tipX, tipY, Items::r1, Items::w1);
6133 DefaultGame::feTip = new Words(36, 0, Text::TipText.at(Text::Fe),defaultColor, tipX, tipY, Items::r1, Items::w1);
6134 DefaultGame::xxTip = new Words(36, 0, Text::TipText.at(Text::Xx),defaultColor, tipX, tipY, Items::r1, Items::w1);
6135 DefaultGame::blTip = new Words(36, 0, Text::TipText.at(Text::Bl),defaultColor, tipX, tipY, Items::r1, Items::w1);
6136 DefaultGame::toTip = new Words(36, 0, Text::TipText.at(Text::To),defaultColor, tipX, tipY, Items::r1, Items::w1);
6137 DefaultGame::skTip = new Words(36, 0, Text::TipText.at(Text::Sk),defaultColor, tipX, tipY, Items::r1, Items::w1);
6138 DefaultGame::braTip = new Words(36, 0, Text::TipText.at(Text::Bra),defaultColor, tipX, tipY, Items::r1, Items::w1);
6139 DefaultGame::paTip = new Words(36, 0, Text::TipText.at(Text::Pa),defaultColor, tipX, tipY, Items::r1, Items::w1);
6140 DefaultGame::thhTip = new Words(36, 0, Text::TipText.at(Text::Thh),defaultColor, tipX, tipY, Items::r1, Items::w1);
6141 DefaultGame::ChTip = new Words(36, 0, Text::TipText.at(Text::Ch),defaultColor, tipX, tipY, Items::r1, Items::w1);
6142 DefaultGame::IncTip = new Words(36, 0, Text::TipText.at(Text::In),defaultColor, tipX, tipY, Items::r1, Items::w1);
6144 DefaultGame::ScrollTip = new Words(52, 0, Text::TipText.at(Text::Scroll), defaultColor, tipX - 0.1f, tipY-0.05, Items::r1, Items::w1);
6146 void loadX() {
6149 void loadAll() {
6151 Items::menuGraphics.MenuBG = Menu::MenuBG = new Texture("art/SubBG.png", Items::r1, Items::w1, Items::serialFlag);
6152 Items::menuGraphics.Title = Menu::Title = new Texture("art/title.png", Items::r1, Items::w1, Items::serialFlag);
6153 Items::menuGraphics.Z3 = Menu::Z3 = new Texture(0.67, 0.7, "art/Z3.png", Items::r1, Items::w1, Items::serialFlag);
6154 Items::menuGraphics.Z2 = Menu::Z2 = new Texture(0.78, 0.52, "art/Z2.png", Items::r1, Items::w1, Items::serialFlag);
6155 Items::menuGraphics.Z1 = Menu::Z1 = new Texture(0.7325, 0.29, "art/Z1.png", Items::r1, Items::w1, Items::serialFlag);
6157 Items::menuGraphics.subBG = SubMenu::subBG = new Texture("art/SubBG.png", Items::r1, Items::w1, Items::serialFlag);
6158 Items::menuGraphics.subMenuIconR = SubMenu::subMenuIconR = new Texture(0.0, 0.6, "art/iconR.png", Items::r1, Items::w1, Items::serialFlag);
6159 // Items::menuGraphics.subMenuIconL = new Texture(-1, 0.6, "art/iconL.png", Items::r1, Items::w1, Items::serialFlag);
6160 Items::menuGraphics.ExtraBG = ExtraMenu::ExtraBG = new Texture("art/ExtraBG.png", Items::r1, Items::w1, Items::serialFlag);
6161 Items::menuGraphics.ExtraBGHolder = ExtraMenu::ExtraBGHolder = new Texture("art/ExtraBGHolder.png", Items::r1, Items::w1, Items::serialFlag);
6162 Items::menuGraphics.pendulumBase = ExtraMenu::pendulumBase = new Texture(0.10, 0.16, "art/base.png", Items::r1, Items::w1, Items::serialFlag);
6163 Items::menuGraphics.pendulumRod = ExtraMenu::pendulumRod = new Texture(0.297, -0.215, "art/arm.png", Items::r1, Items::w1, Items::serialFlag);
6164 Items::menuGraphics.pendulumBase2 = ExtraMenu::pendulumBase2 = new Texture(0.10, 0.16, "art/base2.png", Items::r1, Items::w1, Items::serialFlag);
6165 Items::menuGraphics.pendulumRod2 = ExtraMenu::pendulumRod2 = new Texture(0.297, -0.215, "art/arm2.png", Items::r1, Items::w1, Items::serialFlag);
6167 //Items::menuGraphics.containerTextureEC = ExtraMenu::containerTextureEC = new Texture(0.02, 0.18, 1.0025, 1.0, "art/-ECT.jpg", Items::r1, Items::w1, Items::serialFlag);
6168 // Items::menuGraphics.containerTextureSH = ExtraMenu::containerTextureSH = new Texture(0.02, 0.18, "art/-SHT.jpg", Items::r1, Items::w1, Items::serialFlag);
6170 //Items::menuGraphics.offTrain = offTrain = new Texture("art/2.jpg", Items::r1, Items::w1, Items::serialFlag);
6171 //0.1533457249070632
6172 Items::menuGraphics.card0 = CardTextures::card0 = new Texture(0, 0, "art/card0.png", Items::r1, Items::w1, Items::serialFlag);
6173 Items::menuGraphics.card1 = CardTextures::card1 = new Texture(0, 0, "art/card1.png", Items::r1, Items::w1, Items::serialFlag);
6174 #ifndef BETA
6175 Items::menuGraphics.card2 = CardTextures::card1 = new Texture(0, 0, "art/card1.png", Items::r1, Items::w1, Items::serialFlag);
6176 Items::menuGraphics.card3 = CardTextures::card1 = new Texture(0, 0, "art/card1.png", Items::r1, Items::w1, Items::serialFlag);
6177 Items::menuGraphics.card4 = CardTextures::card1 = new Texture(0, 0, "art/card1.png", Items::r1, Items::w1, Items::serialFlag);
6178 #endif
6179 #ifdef BETA
6180 Items::menuGraphics.card2 = CardTextures::card1 = new Texture(0, 0, "art/white.png", Items::r1, Items::w1, Items::serialFlag);
6181 Items::menuGraphics.card3 = CardTextures::card1 = new Texture(0, 0, "art/white.png", Items::r1, Items::w1, Items::serialFlag);
6182 Items::menuGraphics.card4 = CardTextures::card1 = new Texture(0, 0, "art/white.png", Items::r1, Items::w1, Items::serialFlag);
6183 #endif
6185 Items::menuGraphics.bg1 = new Texture("art/1.jpg", Items::r1, Items::w1, Items::serialFlag);
6186 Items::menuGraphics.bg2 = new Texture("art/2.png", Items::r1, Items::w1, Items::serialFlag);
6187 Items::menuGraphics.bg3 = new Texture("art/3.jpg", Items::r1, Items::w1, Items::serialFlag);
6190 Items::menuGraphics.bg4 = new Texture("art/4.jpg", Items::r1, Items::w1, Items::serialFlag);
6191 Items::menuGraphics.bg5 = new Texture("art/5.jpg", Items::r1, Items::w1, Items::serialFlag);
6192 #ifndef BETA
6193 Items::menuGraphics.bg6 = new Texture("art/6.jpg", Items::r1, Items::w1, Items::serialFlag);
6194 #endif
6196 #ifdef BETA
6197 Items::menuGraphics.bg6 = new Texture("art/white.png", Items::r1, Items::w1, Items::serialFlag);
6198 #endif
6199 //Menu::MenuBG = PlotBG;
6201 float chloroX = 0.76;
6202 float chloroY = 0.80;
6203 float inceX = 0.88;
6204 float inceY = 0.80;
6206 Items::gameGraphics.MainBG = DefaultGame::MainBG = new Texture("art/gameBG.png", Items::r1, Items::w1 , Items::serialFlag);
6207 Items::gameGraphics.CharacterHair = DefaultGame::Character = new Texture("art/artHairHalf.png", Items::r1, Items::w1 , Items::serialFlag);
6208 Items::gameGraphics.CharacterBody = DefaultGame::Character = new Texture("art/artBody.png", Items::r1, Items::w1, Items::serialFlag);
6209 Items::gameGraphics.CharacterTorso = DefaultGame::Character = new Texture("art/artTorso.png", Items::r1, Items::w1, Items::serialFlag);
6210 Items::gameGraphics.CharacterRBreast = new Texture("art/artRBre.png", Items::r1, Items::w1, Items::serialFlag);
6211 Items::gameGraphics.CharacterLBreast = new Texture("art/artLBre.png", Items::r1, Items::w1, Items::serialFlag);
6212 Items::gameGraphics.CharacterLeg = new Texture("art/artLeg.png", Items::r1, Items::w1, Items::serialFlag);
6213 Items::gameGraphics.shadows = new Texture("art/shadows.png", Items::r1, Items::w1, Items::serialFlag);
6214 //Items::gameGraphics.TextBTree = new Texture("art/art-.png", Items::r1, Items::w1, Items::serialFlag);
6216 Items::gameGraphics.UDArrowL = DefaultGame::UDArrowL = new Texture(0.10, 0.135, "Graphics/Icons/DArrow.png", Items::r1, Items::w1 , Items::serialFlag);
6217 Items::gameGraphics.UDArrowR = DefaultGame::UDArrowR = new Texture(0.81, 0.135, "Graphics/Icons/DArrow.png", Items::r1, Items::w1, Items::serialFlag);
6218 Items::gameGraphics.RArrow = DefaultGame::RArrow = new Texture(0.23, 0.35, "Graphics/Icons/RArrow.png", Items::r1, Items::w1 , Items::serialFlag);
6220 Items::gameGraphics.StatsLogo = DefaultGame::StatsLogo = new Texture(0.75, 0.01, "Graphics/Icons/Stats.png", Items::r1, Items::w1 , Items::serialFlag);
6221 Items::gameGraphics.ToolsLogo = DefaultGame::ToolsLogo = new Texture(0.01, 0.01, "Graphics/Icons/Tools.png", Items::r1, Items::w1, Items::serialFlag);
6223 float awaX = 0.748;
6224 float awaY = 0.73;
6225 float expX = 0.9;
6226 float expY = 0.25;
6228 Items::gameGraphics.BoxOLH = DefaultGame::BoxOLH = new Texture(awaX, awaY, "Graphics/boxs/boxol/HBoxO.png", Items::r1, Items::w1 ,Items::serialFlag);
6229 Items::gameGraphics.BoxOLV = DefaultGame::BoxOLV = new Texture(expX, expY, "Graphics/boxs/boxol/VBoxO.png", Items::r1, Items::w1 ,Items::serialFlag);
6231 Items::gameGraphics.BoxOLSel = DefaultGame::BoxOLSel = new Texture(0.05, 0.27, "Graphics/boxs/boxol/BGO.png", Items::r1, Items::w1 ,Items::serialFlag);
6233 Items::gameGraphics.BoxBGH = DefaultGame::BoxBGH = new Texture(awaX - 0.0005, awaY - 0.0005, "graphics/boxs/boxbg/HBoxBG.png", Items::r1, Items::w1 ,Items::serialFlag);
6234 Items::gameGraphics.BoxBGV = DefaultGame::BoxBGV = new Texture(expX-0.0005, expY - 0.0005, "graphics/boxs/boxbg/VBoxBG.png", Items::r1, Items::w1 ,Items::serialFlag);
6235 Items::gameGraphics.BoxBGSel1 = DefaultGame::BoxBGSel1 = new Texture(0.05, 0.27, "graphics/boxs/boxbg/LBG1.png", Items::r1, Items::w1 ,Items::serialFlag);
6236 Items::gameGraphics.BoxBGSel2 = DefaultGame::BoxBGSel2 = new Texture(0.05, 0.47, "graphics/boxs/boxbg/LBG2.png", Items::r1, Items::w1 ,Items::serialFlag);
6237 Items::gameGraphics.BoxBGSel3 = DefaultGame::BoxBGSel3 = new Texture(0.05, 0.67, "graphics/boxs/boxbg/LBG3.png", Items::r1, Items::w1 ,Items::serialFlag);
6238 Items::gameGraphics.BoxBGSel4 = DefaultGame::BoxBGSel4 = new Texture(0.05, 0.27, "graphics/boxs/boxbg/LBG4.png", Items::r1, Items::w1 ,Items::serialFlag);
6239 Items::gameGraphics.BoxBGSel5 = DefaultGame::BoxBGSel5 = new Texture(0.05, 0.27, "graphics/boxs/boxbg/LBG5.png", Items::r1, Items::w1 ,Items::serialFlag);
6241 Items::gameGraphics.BoxFullChloro = DefaultGame::BoxFullChloro = new Texture(chloroX, chloroY, "Graphics/boxs/fullbox/CHC3.png", Items::r1, Items::w1 ,Items::serialFlag);
6242 Items::gameGraphics.BoxFullIncence = DefaultGame::BoxFullIncence = new Texture(inceX, inceY, "Graphics/boxs/fullbox/Ince.png", Items::r1, Items::w1 ,Items::serialFlag);
6244 Items::gameGraphics.BoxMainBGR = DefaultGame::BoxMainBGR = new Texture(0.74, 0.0, "Graphics/boxs/fullbox/BGR.png", Items::r1, Items::w1 ,Items::serialFlag);
6245 Items::gameGraphics.BoxMainBGL = DefaultGame::BoxMainBGL = new Texture("Graphics/boxs/fullbox/BGL.png", Items::r1, Items::w1 ,Items::serialFlag);
6247 Items::gameGraphics.TextBlazer = DefaultGame::TextBlazer = new Texture(0.05, 0.27, "Graphics/Letters/bl.png", Items::r1, Items::w1 ,Items::serialFlag);
6248 Items::gameGraphics.TextBreast = DefaultGame::TextBreast = new Texture(0.05, 0.67, "Graphics/Letters/br.png", Items::r1, Items::w1 ,Items::serialFlag);
6249 Items::gameGraphics.TextShirt = DefaultGame::TextShirt = new Texture(0.05, 0.67, "Graphics/Letters/bra.png", Items::r1, Items::w1 ,Items::serialFlag);
6250 Items::gameGraphics.TextFellatio = Items::gameGraphics.TextFellatio = new Texture(0.05, 0.47, "Graphics/Letters/fel.png", Items::r1, Items::w1 ,Items::serialFlag);
6251 Items::gameGraphics.TextHair = Items::gameGraphics.TextHair = new Texture(0.05, 0.27, "Graphics/Letters/ha.png", Items::r1, Items::w1 ,Items::serialFlag);
6252 Items::gameGraphics.TextMasturbation = new Texture(0.05, 0.27, "Graphics/Letters/ma.png", Items::r1, Items::w1 ,Items::serialFlag);
6253 Items::gameGraphics.TextMouth= DefaultGame::TextMouth = new Texture(0.05, 0.27, "Graphics/Letters/mo.png", Items::r1, Items::w1 ,Items::serialFlag);
6254 Items::gameGraphics.TextNipples = DefaultGame::TextNipples = new Texture(0.05, 0.47, "Graphics/Letters/ni.png", Items::r1, Items::w1 ,Items::serialFlag);
6255 Items::gameGraphics.TextPanties = DefaultGame::TextPanties = new Texture(0.05, 0.47, "Graphics/Letters/pa.png", Items::r1, Items::w1 ,Items::serialFlag);
6256 Items::gameGraphics.TextSkirt = DefaultGame::TextSkirt = new Texture(0.05, 0.27, "Graphics/Letters/sk.png", Items::r1, Items::w1 ,Items::serialFlag);
6257 Items::gameGraphics.TextThighHigh = DefaultGame::TextThighHigh = new Texture(0.05, 0.67, "Graphics/Letters/th.png", Items::r1, Items::w1 ,Items::serialFlag);
6258 Items::gameGraphics.TextThigh = DefaultGame::TextThigh = new Texture(0.05, 0.47, "Graphics/Letters/thi.png", Items::r1, Items::w1 ,Items::serialFlag);
6259 Items::gameGraphics.TextTie = DefaultGame::TextTie = new Texture(0.05, 0.47, "Graphics/Letters/to.png", Items::r1, Items::w1 ,Items::serialFlag);
6260 Items::gameGraphics.TextVagina = DefaultGame::TextVagina = new Texture(0.05, 0.67, "Graphics/Letters/va.png", Items::r1, Items::w1 ,Items::serialFlag);
6261 Items::gameGraphics.TextXXX = DefaultGame::TextXXX = new Texture(0.05, 0.67, "Graphics/Letters/Xx.png", Items::r1, Items::w1 ,Items::serialFlag);
6263 Items::gameGraphics.TextBG = new Texture(0, 0, "art/BG.png", Items::r1, Items::w1, Items::serialFlag);
6264 Items::gameGraphics.TextWall= new Texture(0, 0, "art/Wall.png", Items::r1, Items::w1, Items::serialFlag);
6265 Items::gameGraphics.TextLights = new Texture(0, 0, "art/Lights.png", Items::r1, Items::w1, Items::serialFlag);
6267 Items::gameGraphics.bla = new Texture(0, 0, "clothing/bla.png", Items::r1, Items::w1, Items::serialFlag);
6268 Items::gameGraphics.shirt = new Texture(0, 0, "clothing/shirt.png", Items::r1, Items::w1, Items::serialFlag);
6269 Items::gameGraphics.skirt = new Texture(0, 0, "clothing/skir.png", Items::r1, Items::w1, Items::serialFlag);
6270 Items::gameGraphics.thh = new Texture(0, 0, "clothing/thh.png", Items::r1, Items::w1, Items::serialFlag);
6271 Items::gameGraphics.tie = new Texture(0, 0, "clothing/tie.png", Items::r1, Items::w1, Items::serialFlag);
6272 Items::gameGraphics.tieTop = new Texture(0, 0, "clothing/tieTop.png", Items::r1, Items::w1, Items::serialFlag);
6273 Items::gameGraphics.pa = new Texture(0, 0, "clothing/pa.png", Items::r1, Items::w1, Items::serialFlag);
6275 Items::gameGraphics.paMois = new Texture(0, 0, "clothing/paMois.png", Items::r1, Items::w1, Items::serialFlag);
6276 Items::gameGraphics.mois = new Texture(0, 0, "art/artmois.png", Items::r1, Items::w1, Items::serialFlag);
6278 Items::gameGraphics.semHair = new Texture(0, 0, "art/semha.png", Items::r1, Items::w1, Items::serialFlag);
6279 Items::gameGraphics.semMo = new Texture(0, 0, "art/semmo.png", Items::r1, Items::w1, Items::serialFlag);
6280 Items::gameGraphics.semBre = new Texture(0, 0, "art/sembre.png", Items::r1, Items::w1, Items::serialFlag);
6281 Items::gameGraphics.semSto = new Texture(0, 0, "art/semsto.png", Items::r1, Items::w1, Items::serialFlag);
6282 Items::gameGraphics.semLeg = new Texture(0, 0, "art/semleg.png", Items::r1, Items::w1, Items::serialFlag);
6284 Items::gameGraphics.selTabs = new Texture(0, 0, "Graphics/boxs/fullbox/selBox.png", Items::r1, Items::w1, Items::serialFlag);
6285 Items::gameGraphics.selHighlight = new Texture(0, 0, "Graphics/boxs/fullbox/selectedBox.png", Items::r1, Items::w1, Items::serialFlag);
6287 void loadAni() {
6288 std::vector<Texture*> mo;
6289 for (int i = 1; i <= 95; i++) {
6290 mo.push_back(new Texture("Animations/mo/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6292 std::vector<Texture*> ha;
6293 for (int i = 1; i <= 58; i++) {
6294 ha.push_back(new Texture("Animations/hair/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6296 std::vector<Texture*> lPin;
6297 for (int i = 1; i <= 47; i++) {
6298 lPin.push_back(new Texture("Animations/lPin/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6300 std::vector<Texture*> rPin;
6301 for (int i = 1; i <= 82; i++) {
6302 rPin.push_back(new Texture("Animations/rPin/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6304 std::vector<Texture*> fing;
6305 for (int i = 1; i <= 96; i++) {
6306 fing.push_back(new Texture("Animations/fing/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6308 std::vector<Texture*> idle;
6309 for (int i = 1; i <= 120; i++) {
6310 idle.push_back(new Texture("Animations/idle/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6313 std::vector<Texture*> eyes;
6314 for (int i = 1; i <= 5; i++) {
6315 eyes.push_back(new Texture("Animations/eyes/(" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6317 std::vector<Texture*> fel;
6318 for (int i = 1; i <= 96; i++) {
6319 fel.push_back(new Texture("Animations/fel/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6321 std::vector<Texture*> mas;
6322 for (int i = 1; i <= 131; i++) {
6323 mas.push_back(new Texture("Animations/mastu/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6325 std::vector<Texture*> noBre;
6326 for (int i = 1; i <= 96; i++) {
6327 noBre.push_back(new Texture("Animations/noshirfond/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6329 std::vector<Texture*> bre;
6330 for (int i = 1; i <= 96; i++) {
6331 bre.push_back(new Texture("Animations/shirfond/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6333 std::vector<Texture*> thi;
6334 for (int i = 1; i <= 96; i++) {
6335 thi.push_back(new Texture("Animations/thi/ (" + std::to_string(i) + ").png", Items::r1, Items::w1, Items::serialFlag));
6338 Items::animationLibrary.idleAni = new Animation(idle, Items::serialFlag);
6339 Items::animationLibrary.moAni = new Animation(mo, Items::serialFlag);
6340 Items::animationLibrary.lPiAni = new Animation(lPin, Items::serialFlag);
6341 Items::animationLibrary.rPiAni = new Animation(rPin, Items::serialFlag);
6342 Items::animationLibrary.fiAni = new Animation(fing, Items::serialFlag);
6343 Items::animationLibrary.haAni = new Animation(ha, Items::serialFlag);
6345 Items::animationLibrary.eyesAni = new Animation(eyes, Items::serialFlag);
6346 Items::animationLibrary.felAni = new Animation(fel, Items::serialFlag);
6347 Items::animationLibrary.masAni = new Animation(mas, Items::serialFlag);
6348 Items::animationLibrary.noBreAni = new Animation(noBre, Items::serialFlag);
6349 Items::animationLibrary.breAni = new Animation(bre, Items::serialFlag);
6350 Items::animationLibrary.thiAni = new Animation(thi, Items::serialFlag);
6352 //Items::animationLibrary.moAni = new Animation(new Texture("Animations/mo/mou_spritesheet.png", Items::r1, Items::w1, Items::serialFlag), 1076,1100, Items::serialFlag);
6353 Items::animationLibrary.pokeFake = new Texture("Animations/Poke/Poke.png", Items::r1, Items::w1, Items::serialFlag);
6354 Items::animationLibrary.handFake = new Texture("Animations/hand/hand.png", Items::r1, Items::w1, Items::serialFlag);
6357 void loadMusic() {
6358 printf("Mix_LoadMUS(\"DEFAULT\"): %s\n", Mix_GetError());
6359 Sound::ClickSFX = Items::sfxLibrary.ClickSFX = new SFX("Audio/SFXClick.mp3", 98,Items::serialFlag);
6360 Sound::NoSFX = Items::sfxLibrary.NoSFX = new SFX("Audio/SFXNo.mp3", 98,Items::serialFlag);
6361 Sound::SelectionSFX = Items::sfxLibrary.SelectionSFX = new SFX("Audio/SFXSelection.mp3", 80,Items::serialFlag);
6362 Sound::SelectionSFX2 = Items::sfxLibrary.SelectionSFX2 = new SFX("Audio/SFXSelect2.mp3", 24, Items::serialFlag);
6363 Sound::OpenSFX = Items::sfxLibrary.OpenSFX = new SFX("Audio/SFXOpen.mp3", 54, Items::serialFlag);
6364 Sound::DerobeSFX = Items::sfxLibrary.DerobeSFX = new SFX("Audio/SFXDerobe.mp3", 64 ,Items::serialFlag);
6365 Sound::RobeSFX = Items::sfxLibrary.RobeSFX = new SFX("Audio/SFXRobe.mp3", 64 ,Items::serialFlag);
6367 Sound::IntercomSFX = Items::sfxLibrary.IntercomSFX = new SFX("Audio/GameSFX/dead.mp3", 64 ,Items::serialFlag);
6368 Sound::LightningSFX = Items::sfxLibrary.HornSFX = new SFX("Audio/GameSFX/BGMSFX-Horn.mp3", 64 ,Items::serialFlag);
6369 Sound::PassingSFX = Items::sfxLibrary.PassingSFX = new SFX("Audio/GameSFX/BGMSFX-Passing.mp3", 64 ,Items::serialFlag);
6370 Sound::StepsSFX = Items::sfxLibrary.bangSFX = new SFX("Audio/GameSFX/BGMSFX-bang.mp3", 64 ,Items::serialFlag);
6371 Sound::XingSFX = Items::sfxLibrary.XingSFX = new SFX("Audio/GameSFX/BGMSFX-Xing.mp3", 64 , Items::serialFlag);
6373 Items::sfxLibrary.moSFX = new SFX("Audio/actionSFX/moSFX.mp3", 64, Items::serialFlag);
6374 Items::sfxLibrary.feSFX = new SFX("Audio/actionSFX/feSFX.mp3", 64, Items::serialFlag);
6375 Items::sfxLibrary.fiSFX = new SFX("Audio/actionSFX/fiSFX.mp3", 64, Items::serialFlag);
6376 Items::sfxLibrary.masSFX = new SFX("Audio/actionSFX/masSFX.mp3", 64, Items::serialFlag);
6377 Items::sfxLibrary.moan1SFX = new SFX("Audio/actionSFX/moan1.mp3", 45, Items::serialFlag);
6378 Items::sfxLibrary.neutSFX = new SFX("Audio/actionSFX/neutral.mp3", 64, Items::serialFlag);
6380 Items::sfxLibrary.failSFX = new SFX("Audio/specialSFX/failSound.mp3", 64, Items::serialFlag);
6381 Items::sfxLibrary.heartFastSFX= new SFX("Audio/specialSFX/HeartBeatFast.wav", 64, Items::serialFlag);
6382 Items::sfxLibrary.heartMediumSFX= new SFX("Audio/specialSFX/HeartBeatMedium.wav", 64, Items::serialFlag);
6383 Items::sfxLibrary.heartSlowSFX= new SFX("Audio/specialSFX/HeartBeatSlow.wav", 64, Items::serialFlag);
6384 Items::sfxLibrary.startSFX= new SFX("Audio/specialSFX/StartGame.mp3", 64, Items::serialFlag);
6386 Items::sfxLibrary.errorSFX = new SFX("Audio/SFXError.mp3", 64, Items::serialFlag);
6387 Items::sfxLibrary.pointsSFX = new SFX("Audio/SFXPoints.mp3", 64, Items::serialFlag);
6389 Items::bgmLibrary.Track1 = Sound::Track1 = new BGM("Audio/Track1.wav", Items::serialFlag);
6390 printf("Mix_LoadMUS(\"Track1\"): %s\n", Mix_GetError());
6391 Items::bgmLibrary.Track2 = Sound::Track2 = new BGM("Audio/Track2.mp3", Items::serialFlag);
6392 printf("Mix_LoadMUS(\"Track2\"): %s\n", Mix_GetError());
6393 Items::bgmLibrary.Track3 = Sound::Track4 = new BGM("Audio/Track3.wav", Items::serialFlag);
6394 printf("Mix_LoadMUS(\"Track3\"): %s\n", Mix_GetError());
6395 #ifndef BETA
6396 Items::bgmLibrary.Track4 = Sound::Track3 = new BGM("Audio/Track2.wav", Items::serialFlag);
6397 printf("Mix_LoadMUS(\"Track4\"): %s\n", Mix_GetError());
6398 #endif
6399 #ifdef BETA
6400 Items::bgmLibrary.Track4 = Sound::Track3 = new BGM("Audio/dead.mp3", Items::serialFlag);
6401 printf("Mix_LoadMUS(\"Track4\"): %s\n", Mix_GetError());
6402 #endif
6403 Items::bgmLibrary.TrainBG = Sound::TrainBG = new BGM("Audio/GameSFX/BGMSFX-TrainBG.wav", Items::serialFlag);
6404 printf("Mix_LoadMUS(\"TrainBG\"): %s\n", Mix_GetError());
6407 /*void setPlotElements() {
6408 Plot::opTextureSet.push_back(Items::menuGraphics.bg1);
6409 Plot::opTextureSet.push_back(Items::menuGraphics.bg2);
6410 Plot::opTextureSet.push_back(Items::menuGraphics.card0);
6411 Plot::opOperations.push_back(7);
6412 Plot::opOperations.push_back(17);
6413 Plot::opOperations.push_back(Text::PlotText.size());
6414 Plot::opLocations.push_back(1);
6417 Plot::hardTextureSet.push_back(CardTextures::card1);
6418 Plot::hardOperations = { 2 };
6419 Plot::hardLocations.push_back(1);
6421 Plot::timeTextureSet.push_back(CardTextures::card1);
6422 Plot::timeLocations.push_back(2);
6423 Plot::timeOperations = { 2 };
6425 Plot::badTextureSet.push_back(Items::menuGraphics.bg3);
6426 Plot::badTextureSet.push_back(Items::menuGraphics.bg4);
6427 Plot::badOperations.push_back(0);
6428 Plot::badLocations.push_back(0);
6430 Plot::regularTextureSet.push_back(Items::menuGraphics.bg3);
6431 Plot::regularTextureSet.push_back(Items::menuGraphics.bg5);
6432 Plot::regularOperations.push_back(0);
6433 Plot::regularLocations.push_back(0);
6435 Plot::goodTextureSet.push_back(Items::menuGraphics.bg3);
6436 Plot::goodTextureSet.push_back(Items::menuGraphics.bg6);
6437 Plot::goodOperations.push_back(0);
6438 Plot::goodLocations.push_back(0);
6442 double setScale(int y, int yMax) {
6443 if (y > yMax)
6444 return 1.0;
6445 else
6446 return ((double)y - 200.0) / yMax;
6449 //int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
6450 int main(int argc, char* argv){
6451 if (!Graphics::initialize(2)) std::cout << "GRAPHICS INIT FAILED\n";
6453 Mix_Init(MIX_INIT_MP3);
6454 Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 500);
6456 int monitorX = GetSystemMetrics(SM_CXSCREEN);
6457 int monitorY = GetSystemMetrics(SM_CYSCREEN);
6459 float scale = setScale(monitorY, 1100);
6460 Graphics::scale = scale;
6461 #ifdef SERIALIZE
6462 Graphics::scale = 1.0;
6463 #endif
6465 std::cout << scale << " Scale\n";
6466 std::cout << std::to_string(TTF_Linked_Version()->major) << " MajVer\n";
6467 std::cout << std::to_string(TTF_Linked_Version()->minor) << " MinVer\n";
6468 std::cout << std::to_string(TTF_Linked_Version()->patch) << " PatchVer\n\n";
6471 Items::w1 = SDL_CreateWindow("EroSomnia - TMP", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, scale * 1076, scale * 1100, SDL_WINDOW_OPENGL);
6472 Items::r1 = SDL_CreateRenderer(Items::w1, -1, SDL_RENDERER_ACCELERATED);
6474 SDL_GetWindowSize(Items::w1, &ScreenWidth, &ScreenHeight);
6476 SDL_Surface *icon = SDL_LoadBMP("icon.bmp");
6477 SDL_SetWindowIcon(Items::w1,
6478 icon);
6479 SDL_FreeSurface(icon);
6481 Items::largeBox = {
6482 0,0,
6483 Graphics::prcnt(1.0,'x', Items::w1),Graphics::prcnt(1.0,'y', Items::w1)
6487 bool gameRunning = true;
6488 Items::screen = 0;
6490 Items::msgBox = new Texture("msgbox.png", Items::r1, Items::w1);
6491 Items::blockX = new Texture("xLarge.png", Items::r1, Items::w1);
6493 #ifdef JUMPTEST
6494 using namespace Items;
6495 screen = 11;
6496 gameMode = 1;
6497 bgmLibrary = BGMLibrary::loadBGMLibrary();
6498 bgmLibrary.configureLibrary();
6499 sfxLibrary = SFXLibrary::loadSFXLibrary();
6500 sfxLibrary.configureLibrary();
6501 LoadSequence::loadText();
6502 animationLibrary = AnimationLibrary::loadAnimationLibrary();
6503 animationLibrary.configureLibrary(Items::r1, Items::w1);
6504 #endif
6506 #ifdef BETA
6507 LoadSequence::loadX();
6508 #endif // BETA
6510 Items::mio = new KeyboardMouseIO();
6511 Mix_VolumeMusic(MIX_MAX_VOLUME / 2);
6512 while (gameRunning) {
6513 switch (Items::screen) {
6514 case -1:
6515 gameRunning = false;
6516 break;
6517 case 00: {
6518 #ifdef SERIALIZE
6519 Items::openingItems.StartSFX = Sound::StartSFX = new SFX("Audio/SFXOP.mp3", 64, Items::serialFlag);
6520 Items::openingItems.logoEC = OpeningSequence::logoEC = new Texture("Art/ph1.png", Items::r1, Items::w1, Items::serialFlag);
6521 Items::openingItems.logo2 = OpeningSequence::logo2 = new Texture("Art/ph2.png", Items::r1, Items::w1, Items::serialFlag);
6522 Items::openingItems.white = OpeningSequence::white = new Texture("Art/white.png", Items::r1, Items::w1, Items::serialFlag);
6523 Items::gameGraphics.white = new Texture("Art/white.png", Items::r1, Items::w1, Items::serialFlag);
6524 Items::gameGraphics.black = OpeningSequence::white = new Texture("Art/black.png", Items::r1, Items::w1, Items::serialFlag);
6525 Items::openingItems.saveOpeningItems();
6527 Items::openingItems.clearLibrary();
6528 Items::openingItems = OpeningItems::loadOpeningItems();
6529 Items::openingItems.configureLibrary(Items::r1, Items::w1);
6530 Items::openingItems.clearLibrary();
6532 LoadSequence::loadAll();
6533 Items::gameGraphics.saveGameGraphics();
6535 Items::gameGraphics.clearLibrary();
6536 Items::gameGraphics = GameGraphics::loadGameGraphics();
6537 Items::gameGraphics.configureLibrary(Items::r1, Items::w1);
6538 Items::gameGraphics.clearLibrary();
6540 LoadSequence::loadAni();
6541 Items::animationLibrary.saveAnimationLibrary();
6543 Items::animationLibrary.clearLibrary();
6544 Items::animationLibrary = AnimationLibrary::loadAnimationLibrary();
6545 Items::animationLibrary.configureLibrary(Items::r1, Items::w1);
6546 Items::animationLibrary.clearLibrary();
6548 Items::menuGraphics.saveMenuGraphics();
6550 Items::menuGraphics.clearLibrary();
6551 Items::menuGraphics = MenuGraphics::loadMenuGraphics();
6552 Items::menuGraphics.configureLibrary(Items::r1, Items::w1);
6553 Items::menuGraphics.clearLibrary();
6556 LoadSequence::loadMusic();
6557 Items::sfxLibrary.saveSFXLibrary();
6559 Items::sfxLibrary.clearLibrary();
6560 Items::sfxLibrary = SFXLibrary::loadSFXLibrary();
6561 Items::sfxLibrary.configureLibrary();
6562 Items::sfxLibrary.clearLibrary();
6565 Items::bgmLibrary.saveBGMLibrary();
6566 Items::bgmLibrary.clearLibrary();
6567 Items::bgmLibrary = BGMLibrary::loadBGMLibrary();
6568 Items::bgmLibrary.configureLibrary();
6569 Items::bgmLibrary.clearLibrary();
6571 //LoadSequence::loadText();
6572 //Items::openingItems.StartSFX->playSFX();
6573 //Items::sfxLibraryOpenSFX->playSFX();
6574 //Items::bgmLibrary.Track2->play();*/
6575 //while (Items::screen < 8000) {
6576 //Items::openingItems.logoEC->renderTexture();
6577 //SDL_RenderPresent(Items::r1);
6578 //Items::screen = SDL_GetTicks();
6580 Items::userData.saveProfile();
6581 return 0;
6583 #endif
6584 #ifdef NOSERIAL
6585 Items::openingItems.StartSFX = Items::sfxLibrary.StartSFX = new SFX("Audio/SFXOP.mp3", 64);
6586 Items::openingItems.logoEC = OpeningSequence::logoEC = new Texture("Art/ph1.png", Items::r1, Items::w1);
6587 Items::openingItems.logo2 = OpeningSequence::logo2 = new Texture(-0.15, 0.2, "Art/ph2.png", Items::r1, Items::w1);
6588 Items::openingItems.startMenu = OpeningSequence::startMenu = new Texture("Art/white.png", Items::r1, Items::w1);
6589 Items::openingItems.white = OpeningSequence::white = new Texture("Art/white.png", Items::r1, Items::w1);
6590 Items::openingItems.hs = OpeningSequence::hs = new Words(64, 1, "Sunset & Hariet", 0.0, 0.1, Items::r1, Items::w1);
6591 OpeningSequence::hs->changeTextColor(SDL_Color{ 255,255,255,255 });
6592 Items::openingItems.hsRole = OpeningSequence::hsRole = new Words(64, 1, "Animation & Art", 0.0, 0.55, Items::r1, Items::w1);
6593 Items::openingItems.hsRole->changeTextColor(SDL_Color{ 255,255,255,255 });
6594 OpeningSequence::white->changeImageSize(1.0, 1.0);
6595 #endif
6596 #ifndef SERIALIZE
6597 int optime = SDL_GetTicks();
6598 std::cout << optime << "\n";
6599 Items::openingItems = OpeningItems::loadOpeningItems();
6600 Items::openingItems.configureLibrary(Items::r1, Items::w1);
6601 Items::openingItems.white->changeImageSize(1.0, 1.0);
6603 OpeningSequence::hs = new Words(52, 1, " ", 0.0, 0.1, Items::r1, Items::w1);
6604 OpeningSequence::hs->changeTextColor(SDL_Color{ 255,255,255,255 });
6605 OpeningSequence::hsRole = new Words(52, 1, " ", 0.0, 0.55, Items::r1, Items::w1);
6606 OpeningSequence::hsRole->changeTextColor(SDL_Color{ 255,255,255,255 });
6608 Items::bgmLibrary = BGMLibrary::loadBGMLibrary();
6609 Items::bgmLibrary.configureLibrary();
6611 Items::menuGraphics = MenuGraphics::loadMenuGraphics();
6612 Items::menuGraphics.configureLibrary(Items::r1, Items::w1);
6613 Items::sfxLibrary = SFXLibrary::loadSFXLibrary();
6614 Items::sfxLibrary.configureLibrary();
6616 LoadSequence::loadText();
6617 //LoadSequence::setPlotElements();
6619 int edtime = SDL_GetTicks();
6620 std::cout << "MENU, SFX, TEXT, PLOT: " << (double)(edtime - optime) / 1000 << "\n";
6621 std::cout << "Frames: " << (double)(edtime - optime) / 30 << "\n";
6623 Items::animationLibrary = AnimationLibrary::loadAnimationLibrary();
6624 Items::animationLibrary.configure1Third(Items::r1, Items::w1);
6625 Items::animationLibrary.configure2Third(Items::r1, Items::w1);
6626 OpeningSequence::runSequence();
6627 Items::animationLibrary.configure3Third(Items::r1, Items::w1);
6628 Items::openingItems.clearLibrary();
6630 /*************************/
6631 //Items::screen = 11;
6634 #endif // !SERIALIZE
6636 break;
6637 case 01:
6638 Menu::runGame();
6639 break;
6640 case 02:
6641 SubMenu::runGame();
6642 break;
6643 case 03:
6644 ExtraMenu::runGame();
6645 break;
6646 case 10:
6647 Plot::runGame(Items::textureDelivery, Items::textDelivery, Items::locationsDelivery, Items::operationsDelivery);
6648 break;
6649 case 11:{
6650 int optime = SDL_GetTicks();
6651 std::cout << optime << "\n";
6652 #ifndef JUMPTEST
6653 Items::menuGraphics.clearLibrary();
6654 #endif // !JUMPTEST
6655 GenericGameTools::reset();
6656 Items::gameGraphics = GameGraphics::loadGameGraphics();
6657 Items::gameGraphics.configureLibrary(Items::r1, Items::w1);
6658 Items::gameGraphics.black->changeImageSize(1.0, 1.0);
6660 int edtime = SDL_GetTicks();
6661 std::cout << "GAME: " << (double)(edtime - optime) / 1000 << "\n";
6662 std::cout << "Frames: " << (double)(edtime - optime) / 30<< "\n";
6663 DefaultGame::runGame();
6664 }break;
6668 Items::userData.saveProfile();
6670 #ifdef SERIALIZE
6671 #endif
6673 return 0;